Skip to content

Commit

Permalink
add TLB tracing to test bench
Browse files Browse the repository at this point in the history
Print traces on writes to TLB memories.

Signed-off-by: Michael Walle <michael@walle.cc>
  • Loading branch information
mwalle committed Dec 16, 2012
1 parent d024559 commit b60c754
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/tb_lm32_system.v
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,20 @@ always @(posedge sys_clk) begin
end
`endif

`ifdef TB_ENABLE_TLB_TRACES
always @(posedge sys_clk)
begin
if (lm32.cpu.instruction_unit.itlb.write_port_enable)
$display("itlb write @%04x 0x%08x",
lm32.cpu.instruction_unit.itlb.write_address,
lm32.cpu.instruction_unit.itlb.write_data);
if (lm32.cpu.load_store_unit.dtlb.write_port_enable)
$display("dtlb write @%04x 0x%08x",
lm32.cpu.instruction_unit.itlb.write_address,
lm32.cpu.instruction_unit.itlb.write_data);
end
`endif

// dump signals
reg [256*8:0] vcdfile;
initial begin
Expand Down

0 comments on commit b60c754

Please sign in to comment.