mirror of https://github.com/zachjs/sv2v.git
pass through support for functions with output ports
This commit is contained in:
parent
eb42042c1c
commit
96cfe18ca7
|
|
@ -6,6 +6,7 @@
|
|||
`'1`, `'x`) via `--exclude UnbasedUniszed`
|
||||
* Added support for enumerated type ranges (e.g., `enum { X[3:5] }`)
|
||||
* Added support for passing through DPI imports and exports
|
||||
* Added support for passing through functions with output ports
|
||||
|
||||
### Other Enhancements
|
||||
|
||||
|
|
|
|||
|
|
@ -1571,9 +1571,10 @@ combineDeclsAndStmts (a1, b1) (a2, b2) =
|
|||
makeInput :: Decl -> Decl
|
||||
makeInput (Variable Local t x a e) = Variable Input t x a e
|
||||
makeInput (Variable Input t x a e) = Variable Input t x a e
|
||||
makeInput (Variable Output t x a e) = Variable Output t x a e
|
||||
makeInput (CommentDecl c) = CommentDecl c
|
||||
makeInput other =
|
||||
error $ "unexpected non-var or non-input decl: " ++ (show other)
|
||||
error $ "unexpected non-var or non-port function decl: " ++ (show other)
|
||||
|
||||
checkTag :: String -> String -> a -> ParseState a
|
||||
checkTag _ "" x = return x
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
module top;
|
||||
function automatic integer f;
|
||||
input integer x;
|
||||
output integer y;
|
||||
f = x * 3;
|
||||
y = x * 5;
|
||||
endfunction
|
||||
integer x, y;
|
||||
initial x = f(-1, y);
|
||||
initial $display(x, y);
|
||||
endmodule
|
||||
Loading…
Reference in New Issue