Learning Verilog or VHDL from some good books/sources?

Topics relating to PALs, CPLDs, FPGAs, and other PLDs used for the support or creation of 65-family processors, both hardware and HDL.
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Learning Verilog or VHDL from some good books/sources?

Post by BigEd »

BigEd wrote:
Found some more:
http://staff.washington.edu/jon/verilog-prog.html
Which points to further works online:
http://web.archive.org/web/201303280228 ... index.html
(Via http://jon-jacky.github.io/home/links.html#engr-elec which has a great number of links to lots of interesting things.)
User avatar
Rob Finch
Posts: 465
Joined: 29 Dec 2002
Location: Canada
Contact:

Re: Learning Verilog or VHDL from some good books/sources?

Post by Rob Finch »

I was reading an earlier post and got confused. This issue has already been delt with. but here is an example of blocking assignment use.

One cannot mix blocking and non-blocking assignments to the same reg however. A simple example bitfield extract (o1, o2 and o are calculated in a blocking manner within an always block - this is synthesized code):

Code: Select all

`BFEXT:		
begin
				for (n = 0; n < DWIDTH; n = n + 1)
					o1[n] = mask[n] ? a[n] : 1'b0;
				o2 = o1 >> mb;
				for (n = 0; n < DWIDTH; n = n + 1)
					o[n] = n > ml ? o2[ml] : o2[n];
			end
Post Reply