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.
|
// 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)
|
module rom1p1r #(parameter ADDR_WIDTH = 8, DATA_WIDTH = 32, PRELOAD_ENABLED = 0)
|
||||||
(input logic clk,
|
(input logic clk,
|
||||||
input logic ce,
|
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
|
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
|
// Core Memory
|
||||||
bit [DATA_WIDTH-1:0] ROM [(2**ADDR_WIDTH)-1:0];
|
bit [DATA_WIDTH-1:0] ROM [(2**ADDR_WIDTH)-1:0];
|
||||||
|
|
||||||
|
@ -33,12 +33,6 @@
|
|||||||
`include "idv/idv.svh"
|
`include "idv/idv.svh"
|
||||||
`endif
|
`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::*;
|
import cvw::*;
|
||||||
|
|
||||||
@ -57,7 +51,14 @@ module testbench;
|
|||||||
import idvApiPkg::*;
|
import idvApiPkg::*;
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
`include "parameter-defs.vh"
|
`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;
|
logic clk;
|
||||||
logic reset_ext, reset;
|
logic reset_ext, reset;
|
||||||
|
Loading…
Reference in New Issue
Block a user