Question

In: Electrical Engineering

Create a circuit that allows the client to add numbers one by one into a register...

Create a circuit that allows the client to add numbers one by one into a register file (8 four-bit registers) by inputting: 1) the number itsself 2) the memory location The circuit can be logic gates OR verilog code. whichever you prefer! Thank you and I will rate!

Solutions

Expert Solution

We would be creating a Design that allows the client / user to write number one by one into a register file having 8 four-bit registers.

We are having 8 memory locations. So, bits required to represent 8 memory locations = log2(8) = log2(23) = 3log2(2) = 3.

The Design has DataIN (Number) as a 4 bit input, Address (Memory Location) as a 3 bit input, a Read/Write' input signal for reading/writing from/into the Register memory, CLK (Clock) signal as a clocking source for sequential stuffs and a DataOUT signal as a 4 bit output for reading from the Memory.

The Block Representation of the Design is shown below:

Verilog Implementation of this Design is given below:

module memory (output [3:0] DataOUT, input [3:0] DataIN, input [2:0] Address, input CLK, input RW); // module definition

reg [3:0] mem [2:0]; // register bank with 8 locations of 4 bits each

always @ (posedge CLK) // reading or writing will occur at positive edges of clock
begin
   if (RW)   DataOUT <= mem[Address]; // if Read/Write' is HIGH, memory will be read to DataOUT
   else mem[Address] <= DataIN; // if Read/Write' is LOW, memory will be written from DataIN
end

endmodule

If you find the solution having any issue, drop down a comment and I'll be happy to solve the same. Have a good day.


Related Solutions

Create a circuit that allows the client to add numbers one by one into a register...
Create a circuit that allows the client to add numbers one by one into a register file (8 four-bit registers) by inputting: 1) the number itsself 2) the memory location The circuit can be logic gates OR verilog code. whichever you prefer! Thank you and I will rate!
(JAVA) Create a program that creates a mini database of numbers that allows the user to:...
(JAVA) Create a program that creates a mini database of numbers that allows the user to: reset the database, print the database, add a number to the database, find the sum of the elements in the database, or quit. In main, you will declare an array of 10 integers (this is a requirement). Then you will define the following methods: • printArray (int[ ] arr) – this takes in an array and prints it • initArray (int[ ] arr) –...
1) Question with methods use scanner: 1) Create one method that will add four numbers (return...
1) Question with methods use scanner: 1) Create one method that will add four numbers (return method or regular public static void ) 2) Create another method that will subtract four numbers (return method or regular public static void ) 3) Create another method that will multiplay four numbers (return method or regular public static void ) 4) Create another method that will divide four numbers (return method or regular public static void ) 5) Create another method that will...
ARITHMETIC INSTRUCTIONS a) ADD with register/memory       ADD r [or] ADD M b) ADD immediate.      ...
ARITHMETIC INSTRUCTIONS a) ADD with register/memory       ADD r [or] ADD M b) ADD immediate.       ADI 8 bit data c) ADD with carry       ADC r [or] ADC M Exercise 1: Write Assembly Language Program to add any 3 numbers. Exercise 2: Write Assembly Language Program to add the value 05H with value stored in register C.
C++ programming Instructions Create a ShopCart class that allows you to add items to a shopping...
C++ programming Instructions Create a ShopCart class that allows you to add items to a shopping cart and get the total price of purchases made. Items are simply described by an Item class as follows: class Item {   public:      std :: String description;      float price; }; The ShopCart class must be able to add and remove items and display an invoice. This class must use a dynamically allocated array of items whose capacity is fixed in advance to the build....
Describe, using words and drawings, how you would build a circuit to add floating point numbers.
Describe, using words and drawings, how you would build a circuit to add floating point numbers.
Calculator Class Instructions Create a calculator class that will add, subtract, multiply, and divide two numbers....
Calculator Class Instructions Create a calculator class that will add, subtract, multiply, and divide two numbers. It will have a method that will accept three arguments consisting of a string and two numbers example ("+", 4, 5) where the string is the operator and the numbers are what will be used in the calculation. The class must check for a correct operator (+,*,-,/), and a number (integer) for the second and third argument entered. The calculator cannot divide by zero...
Get into pairs. One of you is the worker; the other is the client. Create a...
Get into pairs. One of you is the worker; the other is the client. Create a hypothetical situation in which the worker has been supporting the client. You need to demonstrate that you can discuss how the worker is meeting the needs of the client. You should also work together to identify and requirements for change. Explain how you would monitor your own work to ensure the required standard of support is maintained.
Use JAVA to Design a simple registration system that allows Student to register in a course....
Use JAVA to Design a simple registration system that allows Student to register in a course. Requirements using 2 classes: class Student & class Course. Implement the scenarios in class Test’s main method. Each student has a name and an id variable. Each object of class Student is initialized using values of name and id passed to constructor. Class Student has get methods for its instance variables.(getters and setters) Each Course has a name, and a variable numberOfStudent representing the...
Create a 4 bit register and explain how it works
Create a 4 bit register and explain how it works
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT