-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Bounded generic parameter #866
Comments
Generic parameters can be classified into the following patterns.
So the following should be required as parameter bound.
Prototype means that the public interface of the item is only defined. The syntax idea is below:
|
Small adjustments of proto interface and package syntax.
Default implementation of proto package ProtoA {
local A: u32;
function FuncA (
x: input logic,
) -> logic;
} Syntax of prototype implementation is like below: module ModuleA for ProtoA #(
) (
) {} |
The necessity of proto interface and package is not clear, but the syntax is more complex than proto module. So in this PR, adding proto module only. |
For interface prototype following items are also required.
|
I created #963. |
Generic parameter doesn't have any constraint.
So user of the defined generics don't know which value is acceptable as generic parameter.
Additionally, giving wrong value as generic parameter causes complex error.
To resolve this issue, many programming languages introduce bounded generic parameter.
The text was updated successfully, but these errors were encountered: