Borrar filtros
Borrar filtros

Offset binary in Simulink HDL

2 visualizaciones (últimos 30 días)
Ho
Ho el 6 de Ag. de 2023
Respondida: Kiran Kintali el 7 de Ag. de 2023
i want to convert a 2's complement number to binary offset in simulink, how do i do the design? can anyone help me? Theoretically, I just need to take the inverse of the MSB to get the binary offset. However I don't know how to do it in simulink

Respuestas (1)

Kiran Kintali
Kiran Kintali el 7 de Ag. de 2023
a = fi(-pi, 1, 6, 0);
msb = getmsb(a);
c = bitcmp(msb);
You can write a MATLAB function block with getmsb and bitcmp functions.

Categorías

Más información sobre Code Generation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by