zorax85
Junior Member level 3
Using the following code lines, generates error (HDLParsers:808 - + can not have such operands in this context.).
I would like just addressing a Parallel Prom through a CPLD. Can someone help me?
Thanks!
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 library IEEE; use IEEE.STD_LOGIC_1164.ALL; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values --use IEEE.NUMERIC_STD.ALL; -- Uncomment the following library declaration if instantiating -- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity Prom_BPI_IF_FSM is Port ( RESET: in STD_LOGIC; PROM_CE : out STD_LOGIC; PROM_WE : out STD_LOGIC; PROM_OE : out STD_LOGIC; PROM_ADV : out STD_LOGIC; PROM_WAIT : in STD_LOGIC; PROM_DATA : inout STD_LOGIC_VECTOR (15 downto 0); PROM_ADDR : out STD_LOGIC_VECTOR (27 downto 0)); end Prom_BPI_IF_FSM; architecture Behavioral of Prom_BPI_IF_FSM is type Prom_BPI_STATE is (IDLE, START_READ, DATA_READING, DATA_READING_PLUS, FINISH); signal current_prom_bpi_state: Prom_BPI_STATE := IDLE; signal next_prom_bpi_state: Prom_BPI_STATE; signal count: std_logic_vector(27 downto 0); begin prom_bpi_if_p: process(current_prom_bpi_state) begin next_prom_bpi_state <= current_prom_bpi_state; case current_prom_bpi_state is when IDLE => if (RESET = '0') then next_prom_bpi_state <= START_READ; end if; when START_READ => count <= "0000000000000000000000000000"; PROM_CE <= '0'; PROM_ADV <= '0'; PROM_OE <= '1'; PROM_ADDR <= (others => '0'); next_prom_bpi_state <= DATA_READING; when DATA_READING => if count < ("0000000000000000000000001111") then PROM_CE <= '0'; PROM_ADV <= '0'; PROM_OE <= '0'; PROM_ADDR <= (count); next_prom_bpi_state <= DATA_READING_PLUS; else next_prom_bpi_state <= FINISH; end if; when DATA_READING_PLUS => count <= count + "0000000000000000000000000001"; next_prom_bpi_state <= DATA_READING; when FINISH => PROM_CE <= '1'; PROM_ADV <= '1'; PROM_OE <= '1'; next_prom_bpi_state <= IDLE; end case; end process; end Behavioral;
I would like just addressing a Parallel Prom through a CPLD. Can someone help me?
Thanks!