lokesh@88
Newbie level 4
- Joined
- Feb 23, 2015
- Messages
- 6
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 37
sir
i want to design one model where input and output both are fixed point . if we will give some selected input then output should be its corresponding output. i have written a code is it write?
i want to design one model where input and output both are fixed point . if we will give some selected input then output should be its corresponding output. i have written a code is it write?
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 library IEEE_proposed; use IEEE_proposed.fixed_pkg.ALL; entity inv_q is port ( address : in ufixed(1 downto -2); data : out ufixed(1 downto -8) ); end inv_q; architecture Behavioral of inv_q is begin process (address) begin case address is when "0000" => data <= "1000001101"; when "0001" => data <= "1001010011"; when "0010" => data <= "0111100001"; when "0011" => data <= "0111000000"; when "0100" => data <= "0110100101"; when "0101" => data <= "0110001110"; when "0110" => data <= "0101111001"; when "0111" => data <= "0101100111"; when "1001" => data <= "0101010111"; when "1010" => data <= "0101001000"; when others => data <="0000000000"; end case; end process; end Behavioral;
Last edited by a moderator: