Skip to content

Commit f86fb74

Browse files
committed
irq: Simplify xics->core irq input
Use a simple wire. common.vhdl types are better kept for things local to the core. We can add more wires later if we need to for HV irqs etc... Signed-off-by: Benjamin Herrenschmidt <[email protected]>
1 parent 573b6b4 commit f86fb74

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

Diff for: common.vhdl

-4
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,6 @@ package common is
399399
write_cr_mask => (others => '0'),
400400
write_cr_data => (others => '0'));
401401

402-
type XicsToExecute1Type is record
403-
irq : std_ulogic;
404-
end record;
405-
406402
end common;
407403

408404
package body common is

Diff for: core.vhdl

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ entity core is
3434
dmi_wr : in std_ulogic;
3535
dmi_ack : out std_ulogic;
3636

37-
xics_in : in XicsToExecute1Type;
37+
ext_irq : in std_ulogic;
3838

3939
terminated_out : out std_logic
4040
);
@@ -291,8 +291,8 @@ begin
291291
flush_out => flush,
292292
stall_out => ex1_stall_out,
293293
e_in => decode2_to_execute1,
294-
i_in => xics_in,
295294
l_in => loadstore1_to_execute1,
295+
ext_irq_in => ext_irq,
296296
l_out => execute1_to_loadstore1,
297297
f_out => execute1_to_fetch1,
298298
e_out => execute1_to_writeback,

Diff for: execute1.vhdl

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ entity execute1 is
2525
e_in : in Decode2ToExecute1Type;
2626
l_in : in Loadstore1ToExecute1Type;
2727

28-
i_in : in XicsToExecute1Type;
28+
ext_irq_in : std_ulogic;
2929

3030
-- asynchronous
3131
l_out : out Execute1ToLoadstore1Type;
@@ -419,7 +419,7 @@ begin
419419
ctrl_tmp.irq_nia <= std_logic_vector(to_unsigned(16#900#, 64));
420420
report "IRQ valid: DEC";
421421
irq_valid := '1';
422-
elsif i_in.irq = '1' then
422+
elsif ext_irq_in = '1' then
423423
ctrl_tmp.irq_nia <= std_logic_vector(to_unsigned(16#500#, 64));
424424
report "IRQ valid: External";
425425
irq_valid := '1';

Diff for: soc.vhdl

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ architecture behaviour of soc is
100100
signal wb_xics0_out : wb_io_slave_out;
101101
signal int_level_in : std_ulogic_vector(15 downto 0);
102102

103-
signal xics_to_execute1 : XicsToExecute1Type;
103+
signal core_ext_irq : std_ulogic;
104104

105105
-- Main memory signals:
106106
signal wb_bram_in : wishbone_master_out;
@@ -170,7 +170,7 @@ begin
170170
dmi_wr => dmi_wr,
171171
dmi_ack => dmi_core_ack,
172172
dmi_req => dmi_core_req,
173-
xics_in => xics_to_execute1
173+
ext_irq => core_ext_irq
174174
);
175175

176176
-- Wishbone bus master arbiter & mux
@@ -512,7 +512,7 @@ begin
512512
wb_in => wb_xics0_in,
513513
wb_out => wb_xics0_out,
514514
int_level_in => int_level_in,
515-
e_out => xics_to_execute1
515+
core_irq_out => core_ext_irq
516516
);
517517

518518
-- BRAM Memory slave

Diff for: xics.vhdl

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ entity xics is
3535

3636
int_level_in : in std_ulogic_vector(LEVEL_NUM - 1 downto 0);
3737

38-
e_out : out XicsToExecute1Type
38+
core_irq_out : out std_ulogic
3939
);
4040
end xics;
4141

@@ -80,7 +80,7 @@ begin
8080
wb_out.dat <= r.wb_rd_data;
8181
wb_out.ack <= r.wb_ack;
8282
wb_out.stall <= '0'; -- never stall wishbone
83-
e_out.irq <= r.irq;
83+
core_irq_out <= r.irq;
8484

8585
comb : process(all)
8686
variable v : reg_internal_t;

0 commit comments

Comments
 (0)