Can you give some idea about the question?

Z

zidong

Design a circuit that has the following function:

If C=00: shift A one step to the left (“shift in” ’0’ on LSB)

If C=01: shift A one step to the right (“shift in” ’0’ on MSB)

If C =10: rotate A one step left

If C=11: rotate A one step right

Input: A (std_logic_vector(7 downto 0))

C (std_logic_vector(1 downto 0)

Output: Z (std_logic_vector(7 downto 0)) – the result of the shifting
or rotation of

A

thanks in advance.
 
T

Tricky

Design a circuit that has the following function:

If C=00: shift A one step to the left (“shift in” ’0’ on LSB)

If C=01: shift A one step to the right (“shift in” ’0’ on MSB)

If C =10: rotate A one step left

If C=11: rotate A one step right

Input: A (std_logic_vector(7 downto 0))

C (std_logic_vector(1 downto 0)

Output: Z (std_logic_vector(7 downto 0)) – the result of the shifting
or rotation of

A

thanks in advance.

Heres a good start:

library ieee;
use ieee.std_logic_1164.all;

entity some_bloke_on_the_internet_did_my_assignment_for_me is
port (
A : in std_logic_vector(7 downto 0);
C : in std_logic_vector(1 downto 0);

Z : out std_logic_vector(7 downto 0)
);
end entity some_bloke_on_the_internet_did_my_assignment_for_me;

architecture I_wrote_this_bit of
some_bloke_on_the_internet_did_my_assignment_for_me is
begin
--place your code here - come back when you get stuck
end architecture I_wrote_this_bit;
 
K

KJ

I think it is a very nice question.

Andy

Except for the subject line, I didn't see any question. A bait-and-
switch from my view. But maybe a question could have been a very nice
question. I wonder if the OP is simulating new dance moves?

KJ
 
B

backhus

Except for the subject line, I didn't see any question.  A bait-and-
switch from my view.  But maybe a question could have been a very nice
question.  I wonder if the OP is simulating new dance moves?

KJ

Hi KJ,
dance move generator, what a brilliant idea!
Take four of these connected to random generators (two legs * x/y
position),
and don't forget the twister(tm)-detector to avoid impossible moves.
With some input (3x3 step mat) and output stuff(3x3 LED) you can put a
dance game into a single CPLD.

More simple minds would suspect this assignment to be an
implementation of the shift execution block of some simple processor
core.
The two bits of C could be part of the opcode, so all rotate/shift
commands can use a common opcode, that differs only by these two bits.
But how boring sounds that.... :)


Have a nice synthesis
Eilert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top