Skip to content

Commit

Permalink
Increase number of APB timers from 2 to 4
Browse files Browse the repository at this point in the history
Instantiate 4 APB timers instead of 2.
Respectively use additional interrupts 7..10

Signed-off-by: Yuri Benditovich <[email protected]>
  • Loading branch information
ybendito committed Apr 5, 2021
1 parent a5a71c1 commit 7837774
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions fpga/src/ariane_peripherals_xilinx.sv
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module ariane_peripherals #(
logic [ariane_soc::NumSources-1:0] irq_sources;

// Unused interrupt sources
assign irq_sources[ariane_soc::NumSources-1:7] = '0;
assign irq_sources[ariane_soc::NumSources-1:11] = '0;

REG_BUS #(
.ADDR_WIDTH ( 32 ),
Expand Down Expand Up @@ -816,7 +816,7 @@ module ariane_peripherals #(

apb_timer #(
.APB_ADDR_WIDTH ( 32 ),
.TIMER_CNT ( 2 )
.TIMER_CNT ( 4 )
) i_timer (
.HCLK ( clk_i ),
.HRESETn ( rst_ni ),
Expand All @@ -828,7 +828,7 @@ module ariane_peripherals #(
.PRDATA ( timer_prdata ),
.PREADY ( timer_pready ),
.PSLVERR ( timer_pslverr ),
.irq_o ( irq_sources[6:3] )
.irq_o ( irq_sources[10:3] )
);
end
endmodule
6 changes: 3 additions & 3 deletions tb/ariane_peripherals.sv
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module ariane_peripherals #(
logic [ariane_soc::NumSources-1:0] irq_sources;

// Unused interrupt sources
assign irq_sources[ariane_soc::NumSources-1:7] = '0;
assign irq_sources[ariane_soc::NumSources-1:11] = '0;

REG_BUS #(
.ADDR_WIDTH ( 32 ),
Expand Down Expand Up @@ -600,7 +600,7 @@ module ariane_peripherals #(

apb_timer #(
.APB_ADDR_WIDTH ( 32 ),
.TIMER_CNT ( 2 )
.TIMER_CNT ( 4 )
) i_timer (
.HCLK ( clk_i ),
.HRESETn ( rst_ni ),
Expand All @@ -612,7 +612,7 @@ module ariane_peripherals #(
.PRDATA ( timer_prdata ),
.PREADY ( timer_pready ),
.PSLVERR ( timer_pslverr ),
.irq_o ( irq_sources[6:3] )
.irq_o ( irq_sources[10:3] )
);
end
endmodule

0 comments on commit 7837774

Please sign in to comment.