Forum Discussion
Altera_Forum
Honored Contributor
9 years agoHELLLP about DPI coding
Try to make a function generator by using DPI sin functions from C, however, error occurred this is my whole sv code package math_pkg; //import dpi task C Name = SV function name...
Altera_Forum
Honored Contributor
9 years ago --- Quote Start --- https://pdfs.semanticscholar.org/f523/c638e72ce7a9b068470510ba54d23bf715fb.pdf --- Quote End --- Thank you so much! this helps me a lot! , :) Can I also ask a question the input/output declaration for a module? for example module slc3( input logic [15:0] S, input logic Clk, Reset, Run, Continue, output logic [11:0] LED, output logic [6:0] HEX0, HEX1, HEX2, HEX3, output logic CE, UB, LB, OE, WE, output logic [19:0] ADDR, inout wire [15:0] Data //tristate buffers need to be of type wire ); i see that all the input output are calculated in a binary form,
However , the input from the article suggestests a fraction number(like 0.45) https://alteraforum.com/forum/attachment.php?attachmentid=13710&stc=1 if the result from sine wave is, for example, -0.52, should i express this in binary for the module 's output? and datatype of the output be like?(logic, real....) thanks!