ADDER X-SC Manual de usuario Pagina 25

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 87
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 24
1.2. B2F 25
will use the following VHDL description of a simple controller.
library IEEE;
use IEEE.std_logic_1164.all;
entity RWFSM is
port(
CLK : in std_logic;
START : in std_logic;
RW : in std_logic;
NE : in std_logic;
BUSY : out std_logic);
end RWFSM;
architecture RTL of RWFSM is
type STATE_TYPE is (IDLE, READING, WRITING, WAITING);
signal CURRENT_STATE, NEXT_STATE: STATE_TYPE;
begin
comb : process(CURRENT_STATE, START, RW, NE)
begin
BUSY <= ’0’;
case CURRENT_STATE is
when IDLE =>
if START = ’0’ then
NEXT_STATE <= IDLE;
elsif RW = ’1’ then
NEXT_STATE <= READING;
else
NEXT_STATE <= WRITING;
end if;
when READING =>
BUSY <= ’1’;
if NE = ’0’ then
NEXT_STATE <= READING;
else
NEXT_STATE <= WAITING;
end if;
when WRITING =>
BUSY <= ’1’;
if NE = ’0’ then
NEXT_STATE <= WRITING;
else
NEXT_STATE <= WAITING;
end if;
when WAITING =>
BUSY <= ’1’;
NEXT_STATE <= IDLE;
end case;
end process;
seq : process
begin
wait until CLK’event and CLK = ’1’;
CURRENT_STATE <= NEXT_STATE;
end process;
end RTL;
we will convert this file to an Alliance behavioral description (.vbe file). We do this with the VASY tool of
alliance using the following command.
% vasy -Vaop -I vhd rwfsm
This will produce the rwfsm.vbe file. Having this file we can then use B2F for converting it to a graph format.
For this, we use the following command.
% b2f -V rwfsm rwgraph
This will produce a rwgraph.fsm file that in turn we can be visualize with the XFSM of Alliance. Be careful,
we must give the corresponding command in an environment where X11 is available (XFSM is X11-based tool).
% xfsm
This will start the visualization tool XFSM. From its File menu we can choose the rwgraph.fsm file that will
shows as shown in Figure 1.8. As could be noted from this output XFSM is not an elaborated tool. It does not
show properly self-loops and does not have editing capabilities either.
Vista de pagina 24
1 2 ... 20 21 22 23 24 25 26 27 28 29 30 ... 86 87

Comentarios a estos manuales

Sin comentarios