Search code examples
vhdlram

vhdl code for RAM memory


I have a question...what is the meaning of the two ** in the following piece of code: TYPE RAM IS ARRAY(0 TO 2 ** ADDRESS_WIDTH - 1) OF std_logic_vector(DATA_WIDTH - 1 DOWNTO 0);


Solution

  • It's being used to indicate exponentiation / raising x to the power of y. The ^ symbol commonly used for exponentiation in written math is used for the exclusive-or (XOR) operation in many languages, so the ones that also support exponentiation use a different symbol.