File tree Expand file tree Collapse file tree 1 file changed +24
-10
lines changed
vtr_flow/benchmarks/verilog Expand file tree Collapse file tree 1 file changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -47,20 +47,28 @@ reg [`MEMORY_CONTROLLER_TAG_SIZE-1:0] prevTag;
4747always @(posedge clk)
4848 prevTag <= tag;
4949
50- always @(posedge clk )
50+ always @(* )
5151begin
5252 if (~ tag)
5353 begin
54- str_address < = memory_controller_address[4 :0 ];
55- str_write_enable < = memory_controller_write_enable;
56- str_in[7 :0 ] < = memory_controller_in[7 :0 ];
54+ str_address = memory_controller_address[4 :0 ];
55+ str_write_enable = memory_controller_write_enable;
56+ str_in[7 :0 ] = memory_controller_in[7 :0 ];
5757 end
58+ else
59+ begin
60+ str_address = 5'h0 ;
61+ str_write_enable = 1'b0 ;
62+ str_in[7 :0 ] = 8'h0 ;
63+ end
5864end
5965
60- always @(posedge clk )
66+ always @(* )
6167begin
6268 if (~ prevTag)
63- memory_controller_out <= str_out;
69+ memory_controller_out = str_out;
70+ else
71+ memory_controller_out = 'h0;
6472end
6573
6674endmodule
@@ -272,15 +280,21 @@ case(cur_state)
272280 end
273281endcase
274282
275- always @(posedge clk )
283+ always @(* )
276284begin
277285
278286 if (cur_state == 4'b1101 )
279287 begin
280- memory_controller_address < = s_07;
281- memory_controller_write_enable < = 1'b1 ;
282- memory_controller_in < = c;
288+ memory_controller_address = s_07;
289+ memory_controller_write_enable = 1'b1 ;
290+ memory_controller_in = c;
283291 end
292+ else
293+ begin
294+ memory_controller_address = 'h0;
295+ memory_controller_write_enable = 1'b0 ;
296+ memory_controller_in = 'h0;
297+ end
284298
285299end
286300
You can’t perform that action at this time.
0 commit comments