verilog
邏輯設計
邏設
digital design
8(a). Suppose Y
is a 32-bit singned binary number. Please assign 1'b1
to Neg
if Y
is negatvie, otherwise assign 1'b0
to it. Write down the code frament.(You are not allow to use any operator, including &
,|
, +
, if else
, (condition)? :
…)
ANS
reference: AS4 Part 2 Review
8(b) According to the waveform, is it a mealy machine or a moore machine. Please expain the reason.
ANS
Mealy.
By definition, the output signal, Out
, is based on the input signal, In
and the current state.
reference: Lab 3 Review
8( c). Describe the following circuit using gate level description.
ANS
reference: as4 part 2 review q3 - code
reference: hello world in Verilog
Note
gate level description:
gate gate_name(output, input1, input2....)
re-assignment is not allowed: