Write a verilog code to swap contents of two registers, Computer Engineering

Assignment Help:

Write  a  verilog  code  to  swap  contents  of  two registers  with  and without  a  temporary register?

With temp reg :

always @ (posedge clock)

begin

temp=b;

b=a;

a=temp;

end

Without temp reg:

always @ (posedge clock)

begin

a <= b;

b <= a;

end

 


Related Discussions:- Write a verilog code to swap contents of two registers

Binary resolution, Binary Resolution: However we saw unit resolution f...

Binary Resolution: However we saw unit resolution for a propositional inference rule in the previous lecture:  (A?  B,   ¬B) /A Thus we can take this a little further to

Explain what is meant by a bus, Question: (a) Comment on the general s...

Question: (a) Comment on the general structure of the IAS Computer, illustrate your answer using a diagram. (b) (i) Define CPU time. (a) (ii) A program runs in 10

Explain main requirements satisfy by page replacement policy, List out the ...

List out the main requirements between page replacement policies which should be satisfied by a page replacement policy? The major requirements that should be satisfied

Overcoming global issues in e-commerce, E-commerce advance tremendous chanc...

E-commerce advance tremendous chance by permitting industrialist to buy Materials at a low price internationally. Also they give companies the opportunity to sell to universal stor

What are escape sequences characters, What are escape sequences characters?...

What are escape sequences characters? List any six of them.  The characters which when used with output functions like printf( ),putc(),put() etc. helps in formatting the outpu

Explain the different sub-functions of process scheduling, Explain the diff...

Explain the different sub-functions of Process Scheduling. Process scheduling contains the subsequent sub-functions: 1. Scheduling: Chooses the process to be executed next

#decoders, #what is decoders? explain with diagram

#what is decoders? explain with diagram

Find out the excess code of decimal number, The excess 3 code of decimal nu...

The excess 3 code of decimal number 26 is ? Ans. (26) 10 in BCD is (00100110) BCD Add 011 to all BCD 01011001 for excess - 3

Explain in detail about the dynamic timing, Explain in detail about the Dyn...

Explain in detail about the Dynamic timing a. Design is simulated in full timing mode. b. Not all possibilities tested, as it is dependent on input test vectors. c. Simul

What are common reason for error massages while copying file, Q. What are c...

Q. What are common reason for error massages while copying file? While copying files with copy, DOS in encounters any error, it displays a suitable error massage. The common re

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd