Forum Discussion
Altera_Forum
Honored Contributor
17 years agoOutputs to a vector.
Example code:module math_real_test (
output signed y
) ;
function real f_real ;
input real x ;
begin
f_real = 5.74857*(x + 0.7071) ;
end
endfunction
assign y = $rtoi(4096.0*f_real(1.0)) ;
endmoduleI am used to the strict typing of VHDL, so I don't know if the $rtoi is required or even necessary.