katkacyt
Newbie level 3
- Joined
- Mar 6, 2015
- Messages
- 3
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 57
Hi,
i'm trying to make a std_ulogic_vector - addressable ROM, but i've got problem with code:
but there are more problems:
first version gives "static range violates bounds"
second version gives "not static choice exclude others choice; non-locally static choice for an aggregate is allowed only if only choice"
and, concerning rom bounds i've got warning "universal integer bound must be numeric literal or attribute"
any help will be welcomed...
i'm trying to make a std_ulogic_vector - addressable ROM, but i've got problem with code:
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 entity rom_opcode is port ( adr_i : in opcode_t; --! address is opcode of instruction inst_o : out instName_t --! output is a type of instruction ); end rom_opcode; architecture be_rom_opcode of rom_opcode is type rom_t is array (0 to (2**OP_CODE_W) - 1) of instName_t; constant opcodeRom : rom_t := ( 001000010000 to 001000011111 => ANDS_IMM, to_integer(unsigned(std_ulogic_vector'("001000010000"))) to to_integer(unsigned(std_ulogic_vector'("001000011111"))) => ANDS_IMM, others => UNDEF); begin inst_o <= opcodeRom(to_integer(unsigned(adr_i))); end architecture be_rom_opcode; ( OP_CODE_W defined in a package => constant OP_CODE_W : natural := 12; opcode_t defined in a package => subtype opcode_t is std_ulogic_vector(OP_CODE_W - 1 downto 0); instName_t defined in a package => type instName_t is (ANDS_IMM, ... , UNDEF);)
but there are more problems:
first version gives "static range violates bounds"
second version gives "not static choice exclude others choice; non-locally static choice for an aggregate is allowed only if only choice"
and, concerning rom bounds i've got warning "universal integer bound must be numeric literal or attribute"
any help will be welcomed...
Last edited by a moderator: