-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature: Import external module #9
Conversation
def test_complex_param_propagation(self):
code = """
`define ABC 12+3
module Mod2 #(
parameter DEPTH = `ABC,
parameter WIDTH = $clog2(DEPTH)
) (
input clk,
input wen,
output signed [WIDTH-1:0] dout
);
endmodule
"""
mod = ExternalModule.from_code(code, "Mod2")(DEPTH=16)
assert mod.params == {"WIDTH": 4, "DEPTH": 16}
assert len(mod.io.dout) == 4 This is a complex test that cannot pass. |
This one shouldn't pass due to the following
I got stuck a bit in this one as I try to keep the library simple and easy to install. Do you have any advice on this one? |
My current thought on this is: we might need to bring in some binary dependency if we want to have better support on module import.
I am currently looking into hdlConvertor |
I think antlr4 is a better choice compared with PyVerilog. |
This allows the whole package still functional when we are running on other platform (e.g. Windows, Mac, etc.) with single command `pip install magia` installation
We have moved to ANTLR4 (hdlConvertor) and make this feature optional. The above test case shall pass. The reason to make this feature optional is we want most of the features from the library to be platform-independent. This feature can considered as a corner use case, as discussed with @yaus, we will put |
Closing #7
Adding Capability to import external SV.
I/O and Parameter parsing is done automatically.