Assembly Language Question

0 comments

Write a simple Verilog code to extend a 4-bit signed number to 8-bit signed number (extended from MSB). Draw a simple block diagram to show the extension.

undefined

[10 pt] Problem 2

undefined

Write a simple Verilog code to truncate from 8-bit unsigned number to 4-bit unsigned number (truncate from MSB and keep the LSBs). Draw a simple block diagram to show the extension.

undefined

[20 pts] Problem 3

undefined

How would we connect multiple 128K× 8-bit memory components to make a 128K×32-bit memory?

undefined

  • [5] First explain how many address bits and data bits are needed for a 128K×8-bit module, and how many address bits and data bits a 128K × 32-bit module needs?
  • [8] Draw a detailed block diagram, with connections and details in memory blocks to build your 128K×32-bit memory from 128K×8-bit memory modules.
  • [7] Write a Verilog model that creates this 128K × 32-bit memory module by instantiating and connecting multiple 128K× 8-bit modules.
    • [5] Draw a detail block diagram for this comparator with input and output signals and intermediate blocks.
    • [5] Write Verilog for this comparator (signed input: in0, in1, signed output: low, high)
    • [5] Explain what is the critical path in your design.

undefined

[15 pt] Problem 4

undefined

Design a comparator that takes two 5-bit signed numbers as Input and Output is two numbers Low and High. For example, if the two input numbers are 20 and 12 then Low is 12 and High is 20.

undefined

[20 pt] Problem 5

undefined

Design a circuit that computes the summation of square magnitude of two 64 elements ai and bi such that pi=ai2+bi2(where i is the index between 0 to 63). ai and bi have been stored in separate SSRAMS memories and the result pi is to be written into a third SSRAM. Assume that computation is started by an input signal, go that is high for one clock cycle. When all 64 elements of pi are computed the output signal done is to be set to be and then the process starts over. Assume ai and bi are 16-bit integer values. There is only one multiplier and one adder available (each one can take 2 input and have one output), you need to design a state machine to perform the operations sequentially.

undefined

The inputs for this circuit are: go, ai and bi

undefined

The outputs for this circuit are: done and pi

undefined

undefined

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}