Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

De0 Nano ADC demo coding explanations

Hello everyone, there's a code line (below) I don't understand from the De0-Nano ADC demo. I tried to find out about the (?) but as far as I can get, there is only (?: conditional) in verilog syntax. Is it mean when go_en is high, the oSCLK is equal to iCLK?

Can somebody explain?

assign oSCLK = (go_en)? iCLK:1;

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    This assignation is equivalent to multiplexer with go_en tied to control input. So if go_en==1 then oSCLK=iCLK else oSCLK=1.