shaiko
Advanced Member level 5
- Joined
- Aug 20, 2011
- Messages
- 2,644
- Helped
- 303
- Reputation
- 608
- Reaction score
- 297
- Trophy points
- 1,363
- Activity points
- 18,302
Like: instead of simply "work" - compile them into: "work1" & "work2" for example?Maybe put them in different libraries?
Why don't you rename the uart files as uart_a and uart_b? Wouldn't that would simplify matters?
The simplification has been done when I started this post to make things clearer...the real designs at question have around 25 components with different functionality but similar names - not just one.Why don't you rename the uart files as uart_a and uart_b? Wouldn't that would simplify matters?
Why don't you rename the uart files as uart_a and uart_b? Wouldn't that would simplify matters?
# this goes into work lib as per the defaults
vlog -sv "../src/top_test.sv"
vlib design_a
# these two will end up in the design_a lib
vlog -sv -work design_a "../src/design_a/design_same_name.sv"
vlog -sv -work design_a "../src/design_a/uart.sv"
vlib design_b
# these two will end up in the design_b lib
vlog -sv -work design_b "../src/design_b/design_same_name.sv"
vlog -sv -work design_b "../src/design_b/uart.sv"
# Specify all libs you intend to use for this simulation
vsim -voptargs="+acc" -t 1ns -lib design_a -lib design_b -lib work work.top_test
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 module top_test; logic clk; logic rst; logic [7:0] in_a; logic [7:0] out_a; logic [7:0] in_b; logic [7:0] out_b; initial begin clk = 0; rst = 0; in_a = 0; in_b = 0; end `uselib lib=design_a design_same_name from_design_a_inst ( .clk (clk), .rst (rst), .in (in_a), .out (out_a)); `uselib lib=design_b design_same_name from_design_b_inst ( .clk (clk), .rst (rst), .in (in_b), .out (out_b)); always begin #50 clk <= ~clk; // 10 MHz clock end endmodule // top_test
Thanks for your effort mrflibble - I really appreciate it!
The thing is - my Verilog is a bit rusty and your solution seems to be somewhat tricky...
For now, I'll just try to rename all modules and see how it goes.
Thanks again for the effort.
No use, as its the component name that's important, not the file name.
If possible, have them is separate libraries. But that might affect them if they both reference the work library, then this idea wont work. To get around this, you can use configurations, so you can map a component to a specified entity, but this will require you to use component declarations.
It took me forever to convince management that this type of simulation is absolutely necessary. I got an OK - under the term that it'll take < 2 days...so now, I can't afford any ventures.ROFL!! Love it! Get working solution and then use renaming anyways.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?