' << ' operator in verilog

前端 未结 3 1377
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-09 07:16

i have a verilog code in which there is a line as follows:

parameter ADDR_WIDTH = 8 ;
parameter RAM_DEPTH = 1 << ADDR_WIDTH;

here what wi

3条回答
  •  南旧
    南旧 (楼主)
    2021-02-09 07:51

    << is the left-shift operator, as it is in many other languages.

    Here RAM_DEPTH will be 1 left-shifted by 8 bits, which is equivalent to 2^8, or 256.

提交回复
热议问题