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;
47
47
always @(posedge clk)
48
48
prevTag <= tag;
49
49
50
- always @(posedge clk )
50
+ always @(* )
51
51
begin
52
52
if (~ tag)
53
53
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 ];
57
57
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
58
64
end
59
65
60
- always @(posedge clk )
66
+ always @(* )
61
67
begin
62
68
if (~ prevTag)
63
- memory_controller_out <= str_out;
69
+ memory_controller_out = str_out;
70
+ else
71
+ memory_controller_out = 'h0;
64
72
end
65
73
66
74
endmodule
@@ -272,15 +280,21 @@ case(cur_state)
272
280
end
273
281
endcase
274
282
275
- always @(posedge clk )
283
+ always @(* )
276
284
begin
277
285
278
286
if (cur_state == 4'b1101 )
279
287
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;
283
291
end
292
+ else
293
+ begin
294
+ memory_controller_address = 'h0;
295
+ memory_controller_write_enable = 1'b0 ;
296
+ memory_controller_in = 'h0;
297
+ end
284
298
285
299
end
286
300
You can’t perform that action at this time.
0 commit comments