I am new to Verilog and I have a lot of problems with this. For example, I want to have an array with eight cells, each of which is 8 bits wide. The following does not work:
reg [7:0] transitionTable [0:7]; assign transitionTable[0] = 10;
doesn't just transitionTable[0] = 10;or transitionTable[0] = 8'h10;any ideas?
transitionTable[0] = 10;
transitionTable[0] = 8'h10;
(In case this is not obvious and relevant: I want to create a state machine and indicate state transitions in the array, since this seems easier than a massive case switch.)
When using, assignyou must declare the array as wireinstead reg.
assign
wire
reg
- FSM, . Verilog parameter, a state next_state case/endcase.
parameter
state
next_state
case/endcase
: FSM
:
, , FSM, , . , FPGA-, ISE ( ) , , , . FSM , FSM.
, , , Verilog.
, , [MSB:LSB] [LSB:MSB]. MSB:LSB, , .
[MSB:LSB]
[LSB:MSB]
MSB:LSB
, :
reg WIDTH reg_name NUMBER;
WIDTH - "" , NUMBER - .
WIDTH
NUMBER
reg [7:0] transitionTable [7:0];
, (8 = 1 ), :
initial begin transitionTable[0] = 8'h10; end
Verilog from - FPGA Verilog Pong P. Chu.
Source: https://habr.com/ru/post/1788888/More articles:Can jQuery widget user interface autocomplete work with delegate on clones? - jqueryTesting memory management in Objective-C (iOS) - memory-managementjQuery body delegate mouse and mouse at the same time - jqueryCan Android v2.3 play MP4 files? - androidJQuery user interface and themes - jqueryDrupal language-switcher не добавляет префиксы - drupalMultifunctional clothing store Magento - magentoБесплатные библиотеки анализа изображений? - c++How to get a set of custom products in Magento? - phpHow to compare two CFUUIDs (Mac OS X Carbon / CoreFoundation)? - uuidAll Articles