== FPGA ==============================================================
- wire [(`DATAWIDTH-1):0] out1;
- wire [(`DATAWIDTH-1):0] out2;
+ wire [(`WORDWIDTH-1):0] out1;
+ wire [(`WORDWIDTH-1):0] out2;
reg [(`CODEBAG_SIZE_BITS-1):0] counter;
reg [(`BRAM_ADDR_WIDTH-1):0] cursor;
initial dispatching_cbd = 0;
wire [(`BRAM_ADDR_WIDTH-1):0] addr1;
- assign addr1 = write_flag ? inAddrWrite_d[(`DATAWIDTH-1):0] : inAddrRead_d[(`DATAWIDTH-1):0];
+ assign addr1 = write_flag ? inAddrWrite_d[(`WORDWIDTH-1):0] : inAddrRead_d[(`WORDWIDTH-1):0];
bram14 mybram(clk, rst, write_flag, addr1, cursor, inDataWrite_d, out1, out2);
assign out_d_ = { out_w , (dispatching_cbd ? out2 : out1) };
// assumes we never want a zero-length codebag
if (`inCBD_full && `out_empty) begin
if (!dispatching_cbd) begin
- cursor <= inCBD_d[(`DATAWIDTH-1):(`CODEBAG_SIZE_BITS)];
+ cursor <= inCBD_d[(`WORDWIDTH-1):(`CODEBAG_SIZE_BITS)];
counter <= 0;
dispatching_cbd <= 1;
end