HDL implementation for bit to integer conversion block
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Mohamed-Helmi
el 7 de Nov. de 2012
Respondida: Dr. ghada farouk
el 4 de Jul. de 2023
I had to use a design where an fsm treats a vector of bits and as an output of the fsm i had to convert it into an integer to be used in the DUT. I had found the bit to integer conversion block under the communication block set, but this block is not supported by the hdl coder. Is there any equivalent block or a trick getting the vector of bits reinterpreted as an other datatype (ufix).
Thanks.
0 comentarios
Respuesta aceptada
Kiran Kintali
el 7 de Nov. de 2012
Hi Mohamed,
MATLAB function block can help develop customer routines like these very easily.
check out the library of helper examples that show how to convert int2bits, bytes2tupe, swappingnibbles using Simulink and MATLAB function block
>> eml_hdl_design_patterns (under Word Twiddlers subsystem)
the example model links in the subsystem should generate HDL.
HTH,
Thanks.
Más respuestas (1)
Dr. ghada farouk
el 4 de Jul. de 2023
My advice to you while using hdl coder, first, keep using the type fi. This type is fixed point signed/unsigned numbers integer/fraction numbers. Second, use the bitsliceget function in which you can select one bit or range of bits.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!