Design unit "moduleName" instantiated in work.*testbench Name* not found in searched libraries: work.

539 views
Skip to first unread message

Ahmad salman

unread,
Mar 11, 2021, 12:56:14 PM3/11/21
to EDA Playground
I am writing a systemVerilog simulation for a single-cycle processor for MIPS:
this is the module code:

module new_top(input   logic clk, reset,            
     output  logic       memwrite,
         output logic alusrca, alusrcb, regwrite, jump, branch,
               output logic [1:0]  memtoreg, aluop, regdst,
         output logic [31:0] pc, instr, readdata, writedata, dataadr,
         output logic pcsrc, zero
     );
logic [2:0]  alucontrol;
    mips mips (clk, reset, pc, instr, memwrite, dataadr, writedata, 
    readdata, pcsrc, zero, alusrca, alusrcb, regwrite, jump, branch, memtoreg, aluop, regdst, alucontrol);
      
    imem imem (pc[7:2], instr);  
    dmem dmem (clk, memwrite, dataadr, writedata, readdata);
    
endmodule



This is the code for the Testbench:
module mips_lite_testbench();
initial
  begin
$dumpfile("dump.vcd");
$dumpvars(1);
  end

  logic clk, reset;            
  logic memwrite;
  logic alusrca, alusrcb, regwrite, jump, branch;
  logic [1:0]  memtoreg, aluop, regdst;
  logic [31:0] pc, instr, readdata, writedata, dataadr;
  logic pcsrc, zero;
  
  new_top dut ( clk, reset, memwrite, alusrca, alusrcb, regwrite, jump, branch, memtoreg, aluop, regdst, pc, instr, readdata, writedata, dataadr, pcsrc, zero );
  
    initial begin
  for( int i = 0; i < 100; i++ )
begin
#10; clk = ~clk;
end
end
  
endmodule


This is the error message:
VSIMSA: Configuration file changed: `/home/runner/library.cfg'
ALIB: Library "work" attached.
work = /home/runner/work/work.lib
MESSAGE "Pass 1. Scanning modules hierarchy."
WARNING VCP2515 "Undefined module: new_top was used. Port connection rules will not be checked at such instantiations." "testbench.sv" 15 161
MESSAGE "Pass 2. Processing instantiations."
MESSAGE "Pass 3. Processing behavioral statements."
MESSAGE "Running Optimizer."
MESSAGE "ELB/DAG code generating."
MESSAGE "Unit top modules: mips_lite_testbench."
MESSAGE "$root top modules: mips_lite_testbench."
SUCCESS "Compile success 0 Errors 1 Warnings Analysis time: 0[s]."
ALOG: Warning: The source is compiled without the -dbg switch. Line breakpoints and assertion debug will not be available.
done
# Aldec, Inc. Riviera-PRO version 2020.04.130.7729 built for Linux64 on June 10, 2020.
# HDL, SystemC, and Assertions simulator, debugger, and design environment.
# (c) 1999-2020 Aldec, Inc. All rights reserved.
# ELBREAD: Elaboration process.
# ELBREAD: Error: ELBREAD_0081 testbench.sv (15): Design unit new_top instantiated in work.mips_lite_testbench not found in searched libraries: work.
# ELBREAD: Error: Elaboration process completed with errors.
# VSIM: Error: Simulation initialization failed.
Finding VCD file...
No *.vcd file found. EPWave will not open. Did you use '$dumpfile("dump.vcd"); $dumpvars;'?
Done

EDA Playground

unread,
Mar 12, 2021, 4:59:51 AM3/12/21
to EDA Playground
One of the great things about EDA Playground is that it is possible to share code by sharing the URL of that code. This is useful when you are asking for someone's help.

Reply all
Reply to author
Forward
0 new messages