mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Fixed conflicts on getenv
This commit is contained in:
parent
0419b5484a
commit
be15a11622
@ -26,13 +26,6 @@
|
||||
|
||||
// This model actually works correctly with vivado.
|
||||
|
||||
`ifdef VERILATOR
|
||||
import "DPI-C" function string getenvval(input string env_name);
|
||||
string WALLY_DIR = getenvval("WALLY");
|
||||
`else
|
||||
string WALLY_DIR = "$WALLY";
|
||||
`endif
|
||||
|
||||
module rom1p1r #(parameter ADDR_WIDTH = 8, DATA_WIDTH = 32, PRELOAD_ENABLED = 0)
|
||||
(input logic clk,
|
||||
input logic ce,
|
||||
@ -40,6 +33,14 @@ module rom1p1r #(parameter ADDR_WIDTH = 8, DATA_WIDTH = 32, PRELOAD_ENABLED = 0)
|
||||
output logic [DATA_WIDTH-1:0] dout
|
||||
);
|
||||
|
||||
`ifdef VERILATOR
|
||||
import "DPI-C" function string getenvval(input string env_name);
|
||||
// string WALLY_DIR = getenvval("WALLY");
|
||||
string WALLY_DIR = "~/cvw";
|
||||
`else
|
||||
string WALLY_DIR = "$WALLY";
|
||||
`endif
|
||||
|
||||
// Core Memory
|
||||
bit [DATA_WIDTH-1:0] ROM [(2**ADDR_WIDTH)-1:0];
|
||||
|
||||
|
@ -33,12 +33,6 @@
|
||||
`include "idv/idv.svh"
|
||||
`endif
|
||||
|
||||
`ifdef VERILATOR
|
||||
import "DPI-C" function string getenvval(input string env_name);
|
||||
string RISCV_DIR = getenvval("RISCV"); // "/opt/riscv";
|
||||
`else
|
||||
string RISCV_DIR = "$RISCV"; // "/opt/riscv";
|
||||
`endif
|
||||
|
||||
import cvw::*;
|
||||
|
||||
@ -57,6 +51,13 @@ module testbench;
|
||||
import idvApiPkg::*;
|
||||
`endif
|
||||
|
||||
`ifdef VERILATOR
|
||||
import "DPI-C" function string getenvval(input string env_name);
|
||||
string RISCV_DIR = getenvval("RISCV"); // "/opt/riscv";
|
||||
`else
|
||||
string RISCV_DIR = "$RISCV"; // "/opt/riscv";
|
||||
`endif
|
||||
|
||||
`include "parameter-defs.vh"
|
||||
|
||||
logic clk;
|
||||
|
Loading…
Reference in New Issue
Block a user