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

about 'DSPB_Type' and 'double' in dspbuilder

Altera_Forum
Honored Contributor II
1,447 Views

I designed a sinwave.mdl yesterday using dspbuilder with the altbus and step block, 

but when I simulate it , the process is failed because the source data's type (coming form the step block)is double ,conflicting with the ALTBus's tye (I defined it is "single bit"), what can I do for it ?  

the error notes: 

Data type mismatch. Input port 1 of 'mymodel/sinctrl' expects a signal of data type 'DSPB_Type'. However, it is driven by a signal of data type 'double'. 

 

Data type mismatch. Output port 1 of 'mymodel/Step' is a signal of data type 'double'. However, it is driving a signal of data type 'DSPB_Type'. 

 

 

Please help me ,thanks!
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
609 Views

You need to add Input and Output blocks around the DSP Builder blocks. These serve to delimit the system that will be synthesized and your testbench. These blocks can be found in the IO & Bus part of the DSP Builder library.

0 Kudos
Altera_Forum
Honored Contributor II
609 Views

what's the differents between the altbus and the input block? and how to set the altbus to input type? I have't know all the dsp librarys very much,are there some books introduce them ? thanks!

0 Kudos
Altera_Forum
Honored Contributor II
609 Views

Before 7.1, there was not much difference between the two blocks. This was when DSP Builder just used double precision floating point numbers for its signal values. Consequently DSP Builder couldn't work properly with signals wider than 51 bits. (The width of the mantissa). 

 

With 7.1 however, DSP Builder supported arbitrary precision signals using its own type, DSPB_TYPE. This type is not recognised by ordinary Simulink blocks so the Input and Output blocks act as a bridge converting the types at the borders of the system. 

 

The Altbus block is then just an internal conversion block. For instance, it can convert from a signed number to an unsigned number or to a fractional number. It can also be used to change the bit-width of a signal.
0 Kudos
Altera_Forum
Honored Contributor II
609 Views

Thanks very much!:)

0 Kudos
Reply