- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have two modules in separate files sub.v and test1.v as shown below. When I attempt to compile them I get the following error messages.
** Error: C:/Users/User/Documents/UCLA/Senior(2015-2016)/Summer/Verilog/Lab5/lab5.1/test1.v(7): Checker 'SUB' not found. Instantiation 's' must be of a visible checker. ** Error: C:/Users/User/Documents/UCLA/Senior(2015-2016)/Summer/Verilog/Lab5/lab5.1/test1.v(7): A begin/end block was found with an empty body. This is permitted in SystemVerilog, but not permitted in Verilog. Please look for any stray semicolons. Both files are in the same directory and are compiled into the same work library. I tried to add a library path that pointed to the sub module in the test1 compile settings but still got no luck. Any ideas? module TEST1; reg [31:0] a,b,c; initial begin a = 12; b = 9; SUB s(a,b,c); end endmodule module SUB(A, B, C); input [31:0] A; input [31:0] B; output [31:0] C; assign C = A - B; endmoduleLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Instance of 'SUB' module needs to be outside initial block. Also variable c in 'TEST1' module needs to be declared as 'wire' since it is output of 'SUB' module. Something like, module TEST1; reg [31:0] a,b; wire [31:0] c; initial begin a = 12; b = 9; end SUB s(a,b,c); endmodule Cheers, Bhaumik- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the quick reply that solved the problem!
-Faraz
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page