Author Topic: [Verilog] Using non-blocking assignments reduces LE's by half!?  (Read 10449 times)

0 Members and 1 Guest are viewing this topic.

Offline Sailor

  • Regular Contributor
  • *
  • Posts: 170
Re: [Verilog] Using non-blocking assignments reduces LE's by half!?
« Reply #25 on: July 06, 2014, 11:23:27 am »
Whoa there...
I'm running Quartus II 13.1, and my device selection is a Cyclone IV. But my RTL diagram is just like the OPs (see attach), except that the +1 value is represented correctly.
How did you get the carry involved?

P.S. how do you get an attached image to be expanded in the post?
P.P.S. the value of +1 is also incorrectly represented in your diagram - just like in the OP's ???
« Last Edit: July 06, 2014, 11:30:33 am by Sailor »
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5127
  • Country: nl
Re: [Verilog] Using non-blocking assignments reduces LE's by half!?
« Reply #26 on: July 06, 2014, 01:00:32 pm »
P.S. how do you get an attached image to be expanded in the post?

Expand it, copy the url from properties and paste it between img tags:

Keyboard error: Press F1 to continue.
 

Offline Sailor

  • Regular Contributor
  • *
  • Posts: 170
Re: [Verilog] Using non-blocking assignments reduces LE's by half!?
« Reply #27 on: July 06, 2014, 01:52:30 pm »
Oh, ok. By an (immediate) edit to your initial post?
 

Offline vortexnlTopic starter

  • Contributor
  • Posts: 40
Re: [Verilog] Using non-blocking assignments reduces LE's by half!?
« Reply #28 on: July 06, 2014, 03:19:44 pm »
I'm running it on Quartus II 13.1 (x64) edition. And the FPGA development board is the Altera DE0 (not the nano!)

Edit:

The testing from my original post was indeed done on the Max II CPLD, so that might affect these results.
« Last Edit: July 06, 2014, 03:21:44 pm by vortexnl »
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5127
  • Country: nl
Re: [Verilog] Using non-blocking assignments reduces LE's by half!?
« Reply #29 on: July 06, 2014, 03:30:42 pm »
Oh, ok. By an (immediate) edit to your initial post?
  :-+
Keyboard error: Press F1 to continue.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: [Verilog] Using non-blocking assignments reduces LE's by half!?
« Reply #30 on: July 06, 2014, 07:46:18 pm »
Whoa there...
How did you get the carry involved?
I just copied the code to a file named cpld.sv since the OP mentioned System Verilog and that was the RTL that it produced.

My device Cyclone IV EP4CE22F17C6N, maybe Quartus II generates different code for different devices and mine happens to trigger the carry?

I haven't studied much at the lower levels so I don't know how the RTL is derived in much detail.
 

Offline Sailor

  • Regular Contributor
  • *
  • Posts: 170
Re: [Verilog] Using non-blocking assignments reduces LE's by half!?
« Reply #31 on: July 06, 2014, 11:23:11 pm »
Ok, that's interesting. I also just copied the OP's code, but to a verilog (.v) file, not System Verilog. Apart from that, everything's pure vanilla. The SV aspect may explain the bad presentation of the +1 value (you and the OP). Maybe the carry arises from the combination of SV + Cyclone IV, but doesn't appear in SV + CPLD. Somewhere, recently, I saw a reference to looking at a lower level (gate level?) than the RTL representation. I'll have a look at the Q II manuals tonight, but maybe a guru could provide some early pointers to the method?
« Last Edit: July 06, 2014, 11:26:17 pm by Sailor »
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8275
Re: [Verilog] Using non-blocking assignments reduces LE's by half!?
« Reply #32 on: July 07, 2014, 12:08:32 pm »
Not gate-level, LE level:
Also you should be able to use the Chip Planner to look at how the LEs were used, which should show the difference more clearly compared to RTL.
 

Offline Sailor

  • Regular Contributor
  • *
  • Posts: 170
Re: [Verilog] Using non-blocking assignments reduces LE's by half!?
« Reply #33 on: July 07, 2014, 01:01:07 pm »
Thanks for that. I must be going blind :palm:
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf