inc2modL architecture

L

Loppy

I need help, please, for write a simple architecture.

The entity for this architecture is:

entity inc2modL is
port ( entrada : in std_logic_vector(7 downto 0);
modulo : in std_logic_vector(7 downto 0);
reset : in std_logic;
clock : in std_logic;
salida : out std_logic_vector(7 downto 0)
);
end inc2modL;

the objective of this entity is:

salida = (entrada + 2) mod (modulo)


Anybody can help me?.

Thanks
 
L

Loppy

Loppy ha escrito:
I need help, please, for write a simple architecture.

The entity for this architecture is:

entity inc2modL is
port ( entrada : in std_logic_vector(7 downto 0);
modulo : in std_logic_vector(7 downto 0);
reset : in std_logic;
clock : in std_logic;
salida : out std_logic_vector(7 downto 0)
);
end inc2modL;

the objective of this entity is:

salida = (entrada + 2) mod (modulo)

sorry,

mod is the rest of a division.

for example:

entrada := "00000111";
modulo := "00000100";

salida will be "00000001"
 

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,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top