FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6356 Discussions

Problem using DSP builder output block with simulink unbuffer block

Altera_Forum
Honored Contributor II
1,553 Views

Hi, 

 

I am pretty new to DSP bilder. I am trying to use a DWT and IDWT block using DSP builder. My design is receiving the input form matlab workspace (1*4096 data, format double, sampling freq 171 hz), feeding the input through altera INPUT block. Then it's a buffer and data converstion block to propagate the data to the DWT blcok. After that I was trying to obtain the original input signal by following a reverse process. But I am getting the following error from the simulink simulator regarding the altera OUTPUT block: 

 

S-function should set the data type of input port 1 of 'test/Output' to the data type specified by the input argument of method mdlSetInputPortDataType. 

 

 

I would appreciate if anyone can help me in this regard. The simulink design file and a snapshot of the design are attached here. 

 

Asad.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
620 Views

The problem is that you haven't used DSP Builder blocks between the Input and Output blocks. DSP Builder does not know how to synthesize most simulink blocks (exceptions are some virtual blocks like Goto and From). 

 

The error is quite cryptic but basically it's saying that there the Output block expects one type while the block feeding into it is giving it another. This is because DSPB blocks use their type which allows them to have very large bit-widths. It also has the advantage of making illegal combinations of blocks obvious (albeit the error messages aren't the most helpful). 

 

(If you have your own HDL you can move the simulink blocks inside a subsystem, wrap them in HDL Inputs/Output blocks and add an HDL Entity block pointing to your own HDL, but of course then you have to write your own HDL... probably not what you want).
0 Kudos
Altera_Forum
Honored Contributor II
620 Views

Hello Asad, 

 

Was wondering you figured out how to use a s-function with dsp builder. 

 

regards Nadeem
0 Kudos
Reply