I want verilog code to perform {w=(p+t-1)/t} with look up taples . The lookup table is to be realized as a ROM where: p is 3 bits t is 2 bits (and not equal to 0)

  • 3
    \$\begingroup\$ Is there a question in there somewhere? \$\endgroup\$ – Tom Carpenter Feb 5 '16 at 22:36
  • \$\begingroup\$ i want know how to do that with look up taple realized as rom \$\endgroup\$ – A_S Feb 5 '16 at 22:46
  • \$\begingroup\$ Do you know how to make a lookup table? \$\endgroup\$ – Tom Carpenter Feb 5 '16 at 22:51

Get a pencil, get a paper. Write down all of the combinations of p and t then calculate w by hand. I'll do one for you... p=101 t=11 {w=(101+11-1)/11} => {w=(5+3-1)/3} => w=7/3=2.333 = 0b10.0101...

Now do this for all possible inputs You never specified what kind of signal you need to output so I'll let you think about that.

Then populate a table with all possible outputs and an index. Use logic to find the right output based on the input.

Homework is work and you need to do the work, not me.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.