1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-01-30 02:32:53 +08:00

Making AW main parameter

This commit is contained in:
Andreas Olofsson 2016-01-11 15:05:21 -05:00
parent 152ee815e3
commit 4a454d71bd
4 changed files with 16 additions and 13 deletions

View File

@ -39,7 +39,6 @@ module dut (/*AUTOARG*/
assign access_out ='b0;
assign packet_out ='b0;
assign wait_out ='b0;
assign reset_done = 1'b1;
endmodule // dut

View File

@ -1,3 +1,4 @@
/* verilator lint_off STMTDLY */
module dv_ctrl(/*AUTOARG*/
// Outputs
nreset, clk, start,
@ -47,11 +48,13 @@ module dv_ctrl(/*AUTOARG*/
//WAVEFORM DUMP
//Better solution?
`ifndef VERILATOR
initial
begin
$dumpfile("waveform.vcd");
//$dumpvars(0, dv_top);
end
`endif
endmodule // dv_ctrl

View File

@ -1,3 +1,4 @@
/* verilator lint_off STMTDLY */
module dv_driver (/*AUTOARG*/
// Outputs
stim_access, stim_packet, stim_wait, stim_done,
@ -6,15 +7,13 @@ module dv_driver (/*AUTOARG*/
);
//Parameters
parameter N = 1; // "N" packets wide
parameter AW = 32; // address width
parameter IDW = 12; // id width
parameter NAME = "none"; // north, south etc
parameter STIMS = 1; // number of stimulus
//derived parameters
localparam DW = AW; //always the same
localparam PW = 2*AW+40;//packet width
parameter N = 1; // "N" packets wide
parameter AW = 32; // address width
parameter IDW = 12; // id width
parameter NAME = "none"; // north, south etc
parameter STIMS = 1; // number of stimulus
parameter MAW = 16; // 64KB memory address width
localparam PW =2*AW+40; // packet width (derived)
//Control signals
input clk;
@ -138,7 +137,8 @@ module dv_driver (/*AUTOARG*/
.coreid (coreid[IDW-1:0]),
.access_in (dut_access[j]),
.packet_in (dut_packet[(j+1)*PW-1:j*PW]),
.wait_in (wait_in));
.wait_in (dut_wait[i])
);
end
endgenerate

View File

@ -2,9 +2,10 @@
module dv_top();
//static variables
parameter PW = 104;
parameter N = 1;
parameter IDW = 12;
parameter AW = 32;
parameter PW = 2*AW+40;
//local variables
integer r;
@ -94,7 +95,7 @@ module dv_top();
);
*/
dv_driver #(.PW(PW),
dv_driver #(.AW(AW),
.N(N),
.NAME("test"),
.IDW(IDW)