Sweta25
Junior Member level 1
- Joined
- Dec 4, 2014
- Messages
- 16
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 126
Hello Everyone,
I am working on some codes for the serial-to-parallel converter...in fact I need to convert 6 serial values ( from 6 sensors which have already been converted to digital form) to parallel form which will be later fed to a comparator... I wrote some codes but I am encountering some errors...I would highly appreciate some help...
here are the errors encountered while simulating sipo codes:
# Error: COMP96_0015: SIPO.vhd : (25, 5): ':' expected.
# Error: COMP96_0018: SIPO.vhd : (25, 5): Identifier expected.
# Error: COMP96_0018: SIPO.vhd : (28, 14): Identifier expected
I am working on some codes for the serial-to-parallel converter...in fact I need to convert 6 serial values ( from 6 sensors which have already been converted to digital form) to parallel form which will be later fed to a comparator... I wrote some codes but I am encountering some errors...I would highly appreciate some help...
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 PFA :serial-to-parallel converter library IEEE; use IEEE.STD_LOGIC_1164.all; use IEEE.STD_LOGIC_unsigned.all; use IEEE.STD_LOGIC_arith.all; entity SIPO is generic (N: integer := 6); port( clk : in STD_LOGIC; Din : in STD_LOGIC_VECTOR(N-1 downto 0); Q : out STD_LOGIC_VECTOR(7 downto 0) ); end SIPO; architecture SIPO of SIPO is component Dff is port ( clk : in STD_LOGIC; Din(i) : in STD_LOGIC_VECTOR ( N-1 downto 0); Q : out STD_LOGIC ); end component; signal s: std_logic_vector (7 downto 0); begin SIPO : for i IN N-1 to 0 generate u0: Dff port map ( clk => clk, Din(i) => Din(i), Q => s(0) ); u1: Dff port map ( clk => clk, Din(i) => s(0), Q => s(1) ); u2: Dff port map ( clk => clk, Din(i) => s(1), Q => s(2) ); u3: Dff port map ( clk => clk, Din(i) => s(2), Q => s(3) ); u4: Dff port map ( clk => clk, Din(N) => s(3), Q => s(4) ); u5: Dff port map ( clk => clk, Din(i) => s(4), Q => s(5) ); u6: Dff port map ( clk => clk, Din(i) => s(5), Q => s(6) ); u7: Dff port map ( clk => clk, Din(i) => s(6), Q => s(7) ); end generate SIPO; Q <= s; end SIPO; also D flip flop codes library IEEE; use IEEE.STD_LOGIC_1164.all; use IEEE.STD_LOGIC_unsigned.all; use IEEE.STD_LOGIC_arith.all; entity Dff is port( clk : in STD_LOGIC; Din : in STD_LOGIC; Q : out STD_LOGIC; notQ : out STD_LOGIC ); end Dff; architecture Dff of Dff is begin process (clk ,Din) begin if (rising_edge (clk)) then Q <= Din; notQ <= not (Din); end if ; end process; end Dff;
here are the errors encountered while simulating sipo codes:
# Error: COMP96_0015: SIPO.vhd : (25, 5): ':' expected.
# Error: COMP96_0018: SIPO.vhd : (25, 5): Identifier expected.
# Error: COMP96_0018: SIPO.vhd : (28, 14): Identifier expected
Last edited by a moderator: