mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Rearranged uart_logger block to only generate if UART is supported
This commit is contained in:
parent
90040a6a21
commit
342c99d6ea
@ -580,12 +580,14 @@ module testbench;
|
||||
end
|
||||
|
||||
// Append UART output to file for tests
|
||||
always @(posedge clk) begin
|
||||
if (P.UART_SUPPORTED & TEST == "buildroot") begin
|
||||
if (~dut.uncore.uncore.uart.uart.MEMWb & dut.uncore.uncore.uart.uart.u.A == 3'b000 & ~dut.uncore.uncore.uart.uart.u.DLAB) begin
|
||||
memFile = $fopen(uartoutfilename, "ab");
|
||||
$fwrite(memFile, "%c", dut.uncore.uncore.uart.uart.u.Din);
|
||||
$fclose(memFile);
|
||||
if (P.UART_SUPPORTED) begin: uart_logger
|
||||
always @(posedge clk) begin
|
||||
if (TEST == "buildroot") begin
|
||||
if (~dut.uncore.uncore.uart.uart.MEMWb & dut.uncore.uncore.uart.uart.u.A == 3'b000 & ~dut.uncore.uncore.uart.uart.u.DLAB) begin
|
||||
memFile = $fopen(uartoutfilename, "ab");
|
||||
$fwrite(memFile, "%c", dut.uncore.uncore.uart.uart.u.Din);
|
||||
$fclose(memFile);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user