You are on page 1of 1

1.with assign we can use directly +,-,* eg: assign c= a*b 2.

assign should be used only with wire type on left side eg: wire c (but if wire type is used on left side(c) the right side also should be also of wire type (a,b i.e if a,b belong to inputs or anyother that declared in port list) otherwise it will flag an error of port incompatible mode) but int rmediate registers can be driven into intermeditae wire types and also main wire types(wires in i/o declared in module) (but in always only reg or intermediate declarations is used on left side (otherwise it will show error port mode incompatible with declaration) but to the right side we can use wire alone or intermediate regs alone or combinatio n of wires and intermediate regs alone (intermediate values are declared as registers outside) assign c=a+b; 3.in always blocking statements are given by = in always non-blocking statements are given by <= eg:c =a+b; c<=a+b; (one varibale can be assigned with blocking or non blocking but not both ..for example if c is provided with blocking then entire statements in alwa ys 'c' has to be proveded with = or else vice versa)

You might also like