Skip to content

Commit

Permalink
Adding inv parameters (#457)
Browse files Browse the repository at this point in the history
* INV params

* Minor fixups to whitespace
  • Loading branch information
dpetrisko authored Jul 17, 2021
1 parent 822d09a commit 8f36b19
Show file tree
Hide file tree
Showing 445 changed files with 1,676 additions and 908 deletions.
6 changes: 4 additions & 2 deletions bsg_async/bsg_async_credit_counter.v
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@

`include "bsg_defines.v"

module bsg_async_credit_counter #(parameter max_tokens_p = "inv"
, parameter lg_credit_to_token_decimation_p = "inv"
module bsg_async_credit_counter #(parameter `BSG_INV_PARAM(max_tokens_p )
, parameter `BSG_INV_PARAM(lg_credit_to_token_decimation_p )
, parameter count_negedge_p = 0
, parameter extra_margin_p = 0
, parameter check_excess_credits_p = 1
Expand Down Expand Up @@ -168,3 +168,5 @@ module bsg_async_credit_counter #(parameter max_tokens_p = "inv"
// ****************************************

endmodule

`BSG_ABSTRACT_MODULE(bsg_async_credit_counter)
6 changes: 4 additions & 2 deletions bsg_async/bsg_async_fifo.v
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

`include "bsg_defines.v"

module bsg_async_fifo #(parameter lg_size_p = "inv"
, parameter width_p = "inv"
module bsg_async_fifo #(parameter `BSG_INV_PARAM( lg_size_p )
, parameter `BSG_INV_PARAM( width_p )
// we allow the control bits to be separated from
// the data bits to allow for better control optimization.
// control_width_p is how many of the width_p bits are control bits;
Expand Down Expand Up @@ -126,3 +126,5 @@ module bsg_async_fifo #(parameter lg_size_p = "inv"
// synopsys translate_on

endmodule // bsg_async_fifo

`BSG_ABSTRACT_MODULE(bsg_async_fifo)
4 changes: 3 additions & 1 deletion bsg_async/bsg_async_ptr_gray.v
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

`include "bsg_defines.v"

module bsg_async_ptr_gray #(parameter lg_size_p = -1
module bsg_async_ptr_gray #(parameter `BSG_INV_PARAM(lg_size_p )
,parameter use_negedge_for_launch_p=0
,parameter use_async_reset_p = 0)
(
Expand Down Expand Up @@ -160,3 +160,5 @@ module bsg_async_ptr_gray #(parameter lg_size_p = -1
assign w_ptr_gray_r_rsync_o = w_ptr_gray_r_rsync;

endmodule

`BSG_ABSTRACT_MODULE(bsg_async_ptr_gray)
6 changes: 3 additions & 3 deletions bsg_async/bsg_launch_sync_sync.v
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ module bsg_launch_sync_sync_``EDGE``_``bits``_unit \
end \
endmodule


`define bsg_launch_sync_sync_async_reset_unit(EDGE,bits) \
\
module bsg_launch_sync_sync_async_reset_``EDGE``_``bits``_unit \
Expand Down Expand Up @@ -153,7 +152,6 @@ module bsg_launch_sync_sync_async_reset_``EDGE``_``bits``_unit \
end \
endmodule


// bsg_launch_sync_sync_posedge_1_unit
`bsg_launch_sync_sync_unit(posedge,1)
`bsg_launch_sync_sync_unit(posedge,2)
Expand Down Expand Up @@ -220,7 +218,7 @@ endmodule
,.oclk_data_o(oclk_data_o[width_p-1-:num]) \
); end

module bsg_launch_sync_sync #(parameter width_p="inv"
module bsg_launch_sync_sync #(parameter `BSG_INV_PARAM(width_p)
, parameter use_negedge_for_launch_p = 0
, parameter use_async_reset_p = 0)
(input iclk_i
Expand Down Expand Up @@ -350,3 +348,5 @@ module bsg_launch_sync_sync #(parameter width_p="inv"
end

endmodule

`BSG_ABSTRACT_MODULE(bsg_launch_sync_sync)
4 changes: 3 additions & 1 deletion bsg_async/bsg_sync_sync.v
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ endmodule
); end


module bsg_sync_sync #(parameter width_p = "inv")
module bsg_sync_sync #(parameter `BSG_INV_PARAM(width_p ))
(
input oclk_i
, input [width_p-1:0] iclk_data_i
Expand Down Expand Up @@ -116,3 +116,5 @@ module bsg_sync_sync #(parameter width_p = "inv")
`bss_if_clause(7)

endmodule

`BSG_ABSTRACT_MODULE(bsg_sync_sync)
10 changes: 5 additions & 5 deletions bsg_cache/bsg_cache.v
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

module bsg_cache
import bsg_cache_pkg::*;
#(`BSG_INV_PARAM(addr_width_p) // byte addr
,`BSG_INV_PARAM(data_width_p) // word size
,`BSG_INV_PARAM(block_size_in_words_p)
,`BSG_INV_PARAM(sets_p)
,`BSG_INV_PARAM(ways_p)
#(parameter `BSG_INV_PARAM(addr_width_p) // byte addr
,parameter `BSG_INV_PARAM(data_width_p) // word size
,parameter `BSG_INV_PARAM(block_size_in_words_p)
,parameter `BSG_INV_PARAM(sets_p)
,parameter `BSG_INV_PARAM(ways_p)

// Explicit size prevents size inference and allows for ((foo == bar) << e_cache_amo_swap)
,parameter [31:0] amo_support_p=(1 << e_cache_amo_swap)
Expand Down
12 changes: 7 additions & 5 deletions bsg_cache/bsg_cache_dma.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

module bsg_cache_dma
import bsg_cache_pkg::*;
#(parameter addr_width_p="inv"
,parameter data_width_p="inv"
,parameter block_size_in_words_p="inv"
,parameter sets_p="inv"
,parameter ways_p="inv"
#(parameter `BSG_INV_PARAM(addr_width_p)
,parameter `BSG_INV_PARAM(data_width_p)
,parameter `BSG_INV_PARAM(block_size_in_words_p)
,parameter `BSG_INV_PARAM(sets_p)
,parameter `BSG_INV_PARAM(ways_p)
,parameter dma_data_width_p=data_width_p

,parameter lg_block_size_in_words_lp=`BSG_SAFE_CLOG2(block_size_in_words_p)
Expand Down Expand Up @@ -377,3 +377,5 @@ module bsg_cache_dma
// synopsys translate_on

endmodule

`BSG_ABSTRACT_MODULE(bsg_cache_dma)
12 changes: 7 additions & 5 deletions bsg_cache/bsg_cache_miss.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

module bsg_cache_miss
import bsg_cache_pkg::*;
#(parameter addr_width_p="inv"
,parameter data_width_p="inv"
,parameter block_size_in_words_p="inv"
,parameter sets_p="inv"
,parameter ways_p="inv"
#(parameter `BSG_INV_PARAM(addr_width_p)
,parameter `BSG_INV_PARAM(data_width_p)
,parameter `BSG_INV_PARAM(block_size_in_words_p)
,parameter `BSG_INV_PARAM(sets_p)
,parameter `BSG_INV_PARAM(ways_p)

,parameter lg_block_size_in_words_lp=`BSG_SAFE_CLOG2(block_size_in_words_p)
,parameter lg_sets_lp=`BSG_SAFE_CLOG2(sets_p)
Expand Down Expand Up @@ -483,3 +483,5 @@ module bsg_cache_miss
end

endmodule

`BSG_ABSTRACT_MODULE(bsg_cache_miss)
16 changes: 9 additions & 7 deletions bsg_cache/bsg_cache_non_blocking.v
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

module bsg_cache_non_blocking
import bsg_cache_non_blocking_pkg::*;
#(parameter id_width_p="inv"
, parameter addr_width_p="inv"
, parameter data_width_p="inv"
, parameter sets_p="inv"
, parameter ways_p="inv"
, parameter block_size_in_words_p="inv"
, parameter miss_fifo_els_p="inv"
#(parameter `BSG_INV_PARAM(id_width_p)
, parameter `BSG_INV_PARAM(addr_width_p)
, parameter `BSG_INV_PARAM(data_width_p)
, parameter `BSG_INV_PARAM(sets_p)
, parameter `BSG_INV_PARAM(ways_p)
, parameter `BSG_INV_PARAM(block_size_in_words_p)
, parameter `BSG_INV_PARAM(miss_fifo_els_p)

, parameter cache_pkt_width_lp=`bsg_cache_non_blocking_pkt_width(id_width_p,addr_width_p,data_width_p)
, parameter dma_pkt_width_lp=`bsg_cache_non_blocking_dma_pkt_width(addr_width_p)
Expand Down Expand Up @@ -609,3 +609,5 @@ module bsg_cache_non_blocking


endmodule

`BSG_ABSTRACT_MODULE(bsg_cache_non_blocking)
10 changes: 6 additions & 4 deletions bsg_cache/bsg_cache_non_blocking_data_mem.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

module bsg_cache_non_blocking_data_mem
import bsg_cache_non_blocking_pkg::*;
#(parameter data_width_p="inv"
, parameter ways_p="inv"
, parameter sets_p="inv"
, parameter block_size_in_words_p="inv"
#(parameter `BSG_INV_PARAM(data_width_p)
, parameter `BSG_INV_PARAM(ways_p)
, parameter `BSG_INV_PARAM(sets_p)
, parameter `BSG_INV_PARAM(block_size_in_words_p)

, parameter lg_ways_lp=`BSG_SAFE_CLOG2(ways_p)
, parameter lg_sets_lp=`BSG_SAFE_CLOG2(sets_p)
Expand Down Expand Up @@ -201,3 +201,5 @@ module bsg_cache_non_blocking_data_mem

endmodule

`BSG_ABSTRACT_MODULE(bsg_cache_non_blocking_data_mem)

12 changes: 7 additions & 5 deletions bsg_cache/bsg_cache_non_blocking_dma.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

module bsg_cache_non_blocking_dma
import bsg_cache_non_blocking_pkg::*;
#(parameter addr_width_p="inv"
, parameter data_width_p="inv"
, parameter block_size_in_words_p="inv"
, parameter sets_p="inv"
, parameter ways_p="inv"
#(parameter `BSG_INV_PARAM(addr_width_p)
, parameter `BSG_INV_PARAM(data_width_p)
, parameter `BSG_INV_PARAM(block_size_in_words_p)
, parameter `BSG_INV_PARAM(sets_p)
, parameter `BSG_INV_PARAM(ways_p)

, parameter lg_sets_lp=`BSG_SAFE_CLOG2(sets_p)
, parameter lg_ways_lp=`BSG_SAFE_CLOG2(ways_p)
Expand Down Expand Up @@ -355,3 +355,5 @@ module bsg_cache_non_blocking_dma


endmodule

`BSG_ABSTRACT_MODULE(bsg_cache_non_blocking_dma)
14 changes: 8 additions & 6 deletions bsg_cache/bsg_cache_non_blocking_mhu.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

module bsg_cache_non_blocking_mhu
import bsg_cache_non_blocking_pkg::*;
#(parameter id_width_p="inv"
, parameter addr_width_p="inv"
, parameter data_width_p="inv"
, parameter ways_p="inv"
, parameter sets_p="inv"
, parameter block_size_in_words_p="inv"
#(parameter `BSG_INV_PARAM(id_width_p)
, parameter `BSG_INV_PARAM(addr_width_p)
, parameter `BSG_INV_PARAM(data_width_p)
, parameter `BSG_INV_PARAM(ways_p)
, parameter `BSG_INV_PARAM(sets_p)
, parameter `BSG_INV_PARAM(block_size_in_words_p)

, parameter lg_ways_lp=`BSG_SAFE_CLOG2(ways_p)
, parameter lg_sets_lp=`BSG_SAFE_CLOG2(sets_p)
Expand Down Expand Up @@ -831,3 +831,5 @@ module bsg_cache_non_blocking_mhu


endmodule

`BSG_ABSTRACT_MODULE(bsg_cache_non_blocking_mhu)
6 changes: 4 additions & 2 deletions bsg_cache/bsg_cache_non_blocking_miss_fifo.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

module bsg_cache_non_blocking_miss_fifo
import bsg_cache_non_blocking_pkg::*;
#(parameter width_p="inv"
,parameter els_p="inv"
#(parameter `BSG_INV_PARAM(width_p)
,parameter `BSG_INV_PARAM(els_p)
)
(
input clk_i
Expand Down Expand Up @@ -378,3 +378,5 @@ module bsg_cache_non_blocking_miss_fifo
// synopsys translate_on

endmodule

`BSG_ABSTRACT_MODULE(bsg_cache_non_blocking_miss_fifo)
6 changes: 4 additions & 2 deletions bsg_cache/bsg_cache_non_blocking_stat_mem.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

module bsg_cache_non_blocking_stat_mem
import bsg_cache_non_blocking_pkg::*;
#(parameter ways_p="inv"
, parameter sets_p="inv"
#(parameter `BSG_INV_PARAM(ways_p)
, parameter `BSG_INV_PARAM(sets_p)

, parameter lg_sets_lp=`BSG_SAFE_CLOG2(sets_p)

Expand Down Expand Up @@ -171,3 +171,5 @@ module bsg_cache_non_blocking_stat_mem


endmodule

`BSG_ABSTRACT_MODULE(bsg_cache_non_blocking_stat_mem)
10 changes: 6 additions & 4 deletions bsg_cache/bsg_cache_non_blocking_tag_mem.v
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

module bsg_cache_non_blocking_tag_mem
import bsg_cache_non_blocking_pkg::*;
#(parameter sets_p="inv"
, parameter ways_p="inv"
, parameter tag_width_p="inv"
, parameter data_width_p="inv"
#(parameter `BSG_INV_PARAM(sets_p)
, parameter `BSG_INV_PARAM(ways_p)
, parameter `BSG_INV_PARAM(tag_width_p)
, parameter `BSG_INV_PARAM(data_width_p)

, parameter lg_ways_lp=`BSG_SAFE_CLOG2(ways_p)
, parameter lg_sets_lp=`BSG_SAFE_CLOG2(sets_p)
Expand Down Expand Up @@ -211,3 +211,5 @@ module bsg_cache_non_blocking_tag_mem
// synopsys translate_on

endmodule

`BSG_ABSTRACT_MODULE(bsg_cache_non_blocking_tag_mem)
14 changes: 8 additions & 6 deletions bsg_cache/bsg_cache_non_blocking_tl_stage.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

module bsg_cache_non_blocking_tl_stage
import bsg_cache_non_blocking_pkg::*;
#(parameter id_width_p="inv"
, parameter addr_width_p="inv"
, parameter data_width_p="inv"
, parameter ways_p="inv"
, parameter sets_p="inv"
, parameter block_size_in_words_p="inv"
#(parameter `BSG_INV_PARAM(id_width_p)
, parameter `BSG_INV_PARAM(addr_width_p)
, parameter `BSG_INV_PARAM(data_width_p)
, parameter `BSG_INV_PARAM(ways_p)
, parameter `BSG_INV_PARAM(sets_p)
, parameter `BSG_INV_PARAM(block_size_in_words_p)

, parameter lg_ways_lp=`BSG_SAFE_CLOG2(ways_p)
, parameter lg_sets_lp=`BSG_SAFE_CLOG2(sets_p)
Expand Down Expand Up @@ -473,3 +473,5 @@ module bsg_cache_non_blocking_tl_stage


endmodule

`BSG_ABSTRACT_MODULE(bsg_cache_non_blocking_tl_stage)
8 changes: 5 additions & 3 deletions bsg_cache/bsg_cache_sbuf.v
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

module bsg_cache_sbuf
import bsg_cache_pkg::*;
#(parameter data_width_p="inv"
,parameter addr_width_p="inv"
,parameter ways_p="inv"
#(parameter `BSG_INV_PARAM(data_width_p)
,parameter `BSG_INV_PARAM(addr_width_p)
,parameter `BSG_INV_PARAM(ways_p)

,localparam data_mask_width_lp=(data_width_p>>3)
,localparam sbuf_entry_width_lp=`bsg_cache_sbuf_entry_width(addr_width_p,data_width_p,ways_p)
Expand Down Expand Up @@ -218,3 +218,5 @@ module bsg_cache_sbuf
// synopsys translate_on

endmodule

`BSG_ABSTRACT_MODULE(bsg_cache_sbuf)
4 changes: 3 additions & 1 deletion bsg_cache/bsg_cache_sbuf_queue.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
`include "bsg_defines.v"

module bsg_cache_sbuf_queue
#(parameter width_p="inv")
#(parameter `BSG_INV_PARAM(width_p))
(
input clk_i
,input [width_p-1:0] data_i
Expand Down Expand Up @@ -43,3 +43,5 @@ module bsg_cache_sbuf_queue


endmodule

`BSG_ABSTRACT_MODULE(bsg_cache_sbuf_queue)
Loading

0 comments on commit 8f36b19

Please sign in to comment.