Altera_Forum
Honored Contributor
13 years agooffset binary to signed converter for ADC
Hello
I’m neebie in VHDL. I’m trying to build a simple radio receiver: CAN , mult, filter, I Q demod in Cyclone III , with quartus . I ‘m sorry for this question here, be I don’t found solution, after many searches. I’d like to convert the input data from CAN (offset binary) to signed value. Very common issue...At the end I’d like to do the conversion from signed to offset inary . Thus I try next code ( only on 3 bits for investigation purpose). Compilation ok, building component ok , starting simulation Ok ; but result Is the same as input…I ‘ don’t understand. Many thanks for your help. LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_arith.all; ENTITY convsign IS PORT (op1 : IN UNSIGNED(2 DOWNTO 0); resu : OUT SIGNED(2 DOWNTO 0)); END convsign; ARCHITECTURE cpcvsign OF convsign IS BEGIN resu <= CONV_SIGNED(op1, 3); END cpcvsign;