Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project namespace #35

Closed
dalance opened this issue Dec 25, 2022 · 2 comments
Closed

project namespace #35

dalance opened this issue Dec 25, 2022 · 2 comments
Labels
lang Language design tools Tools feature

Comments

@dalance
Copy link
Collaborator

dalance commented Dec 25, 2022

to avoid name conflict between packages

@dalance dalance added lang Language design tools Tools feature labels Dec 25, 2022
@dalance dalance changed the title package namespace project namespace Dec 26, 2022
@dalance
Copy link
Collaborator Author

dalance commented Jan 15, 2023

:: can be used for project namespace resolver like package.

[dependencies]
prj1 = { git = "" }
module ModuleA {
    inst a: prj1::ModuleB;
}

In SystemVerilog, :: is replaced with _.

module ModuleA;
    prj1_ModuleB a();
endmodule

@dalance
Copy link
Collaborator Author

dalance commented Jan 18, 2023

Project name should be added too.

[project]
name = "sample"

[dependencies]
prj1 = { git = "" }
module ModuleA {
    inst a: prj1::ModuleB;
}
module sample_ModuleA;
    prj1_ModuleB a();
endmodule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang Language design tools Tools feature
Projects
None yet
Development

No branches or pull requests

1 participant