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

verilog parser - parse as a port of a function's port. #11

Open
KyleJeong opened this issue May 26, 2018 · 0 comments
Open

verilog parser - parse as a port of a function's port. #11

KyleJeong opened this issue May 26, 2018 · 0 comments

Comments

@KyleJeong
Copy link

I have a module which include a function in a module.
In that cases, it thought 'value' and 'lshift' are ports.

module xxx (
aaa
);

output reg [1:0] aaa;

function [29:0] lshift45_16;
input [44:0] value;
input [3:0] lshift;
begin
case (lshift)
8: lshift45_16 = {value[37: 8]};
9: lshift45_16 = {value[38: 9]};
10: lshift45_16 = {value[39:10]};
11: lshift45_16 = {value[40:11]};
12: lshift45_16 = {value[41:12]};
13: lshift45_16 = {value[42:13]};
14: lshift45_16 = {value[43:14]};
15: lshift45_16 = {value[44:15]};
default: lshift45_16 = value[44:15];
endcase
end
endfunction

endmodule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant