Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit 9632e55a authored by Hachemin Pierre-Yves's avatar Hachemin Pierre-Yves

first main for serial

parent 71a1ba7d
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Main is
Port(
clk : in STD_LOGIC;
output : out STD_LOGIC);
end Main;
architecture Behavioral of Main is
component RxOverlayer is
Port ( Clk : in STD_LOGIC;
Trigger : out STD_LOGIC_VECTOR (7 downto 0);
DataIn :out STD_LOGIC_VECTOR (7 downto 0);
DoneRx : out STD_LOGIC);
end component;
signal Trigger : STD_LOGIC_VECTOR (7 downto 0);
signal DataIn : STD_LOGIC_VECTOR (7 downto 0);
signal DoneRx : STD_LOGIC;
component Int_Address is
Port (
Clk : in STD_LOGIC;
trig_address : in STD_LOGIC;
address9 : in STD_LOGIC_VECTOR (8 downto 0);
address : out STD_LOGIC_VECTOR (8 downto 0));
end component;
signal trig_address : STD_LOGIC;
signal address : STD_LOGIC_VECTOR (8 downto 0);
component Int_Color is
Port (
Clk : in STD_LOGIC;
trig_color : in STD_LOGIC;
color4 : in STD_LOGIC_VECTOR (3 downto 0);
color : out STD_LOGIC_VECTOR (7 downto 0));
end component;
signal trig_color : STD_LOGIC;
signal color : STD_LOGIC_VECTOR (7 downto 0);
component Int_GoboRot is
Port (
Clk : in STD_LOGIC;
trig_goboRot : in STD_LOGIC;
goboRot8 : in STD_LOGIC_VECTOR (7 downto 0);
goboRot : out STD_LOGIC_VECTOR (7 downto 0));
end component;
signal trig_goboRot : STD_LOGIC;
signal goboRot : STD_LOGIC_VECTOR (7 downto 0);
component Int_GoboWheel is
Port (
Clk : in STD_LOGIC;
trig_goboWheel : in STD_LOGIC;
goboWheel4 : in STD_LOGIC_VECTOR (3 downto 0);
goboWheel : out STD_LOGIC_VECTOR (7 downto 0));
end component;
signal trig_goboWheel : STD_LOGIC;
signal goboWheel : STD_LOGIC_VECTOR (7 downto 0);
component Int_Pan is
Port (
Clk : in STD_LOGIC;
trig_pan : in STD_LOGIC;
pan8 : in STD_LOGIC_VECTOR (7 downto 0);
pan : out STD_LOGIC_VECTOR (7 downto 0));
end component;
signal trig_pan : STD_LOGIC;
signal pan : STD_LOGIC_VECTOR (7 downto 0);
component Int_Shutter is
Port (
Clk : in STD_LOGIC;
trig_shutter : in STD_LOGIC;
shutter8 : in STD_LOGIC_VECTOR (7 downto 0);
shutter : out STD_LOGIC_VECTOR (7 downto 0));
end component;
signal trig_shutter : STD_LOGIC;
signal shutter : STD_LOGIC_VECTOR (7 downto 0);
component Int_Tilt is
Port (
Clk : in STD_LOGIC;
trig_tilt : in STD_LOGIC;
tilt8 : in STD_LOGIC_VECTOR (7 downto 0);
tilt : out STD_LOGIC_VECTOR (7 downto 0));
end component;
signal trig_tilt : STD_LOGIC;
signal tilt : STD_LOGIC_VECTOR (7 downto 0);
component frameController is
Port (
goboWheel : in STD_LOGIC_VECTOR (7 downto 0);
goboRot : in STD_LOGIC_VECTOR (7 downto 0);
color : in STD_LOGIC_VECTOR (7 downto 0);
shutter : in STD_LOGIC_VECTOR (7 downto 0);
pan : in STD_LOGIC_VECTOR (7 downto 0);
tilt : in STD_LOGIC_VECTOR (7 downto 0);
address : in STD_LOGIC_VECTOR (8 downto 0);
send : in STD_LOGIC;
clk : in STD_LOGIC;
tx : out STD_LOGIC;
done : out STD_LOGIC
);
end component;
signal send : STD_LOGIC;
signal tx : STD_LOGIC;
signal done : STD_LOGIC;
begin
Rx : RxOverlayer port map(
Clk => Clk,
Trigger => Trigger,
DataIn => DataIn,
DoneRx => DoneRx
);
IntAddress : Int_Address port map(
Clk => Clk,
trig_address => trig_address,
address9 => DataIn,
address => address
);
IntColor : Int_Color port map(
Clk => Clk,
trig_color => trig_color,
color4 => DataIn,
color => color
);
IntGoboRot : Int_GoboRot port map(
Clk => Clk,
trig_goboRot => trig_goboRot,
goboRot8 => DataIn,
goboRot => goboRot
);
IntGoboWheel : Int_GoboWheel port map(
Clk => Clk,
trig_goboWheel => trig_goboWheel,
goboWheel4 => DataIn,
goboWheel => goboWheel
);
IntPan : Int_Pan port map(
Clk => Clk,
trig_pan => trig_pan,
pan8 => DataIn,
pan => pan
);
IntShutter : Int_shutter port map(
Clk => Clk,
trig_shutter => trig_shutter,
shutter8 => DataIn,
shutter => shutter
);
IntTilt : Int_Tilt port map(
Clk => Clk,
trig_tilt => trig_tilt,
tilt8 => DataIn,
tilt => tilt
);
FrameControl : frameController port map(
goboWheel => goboWheel,
goboRot => goboRot,
color => color,
shutter => shutter,
pan => pan,
tilt => tilt,
address => address,
send => send,
clk => Clk,
tx => Tx,
done => done
);
trig_address <= Trigger(0);
trig_color <= Trigger(1);
trig_goboRot <= Trigger(2);
trig_goboWheel <= Trigger(3);
trig_pan <= Trigger(4);
trig_shutter <= Trigger(5);
trig_tilt <= Trigger(6);
end Behavioral;
......@@ -2,11 +2,9 @@ library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity RxOverlayer is
Port ( DataIn : in STD_LOGIC_VECTOR (7 downto 0);
DataRdy : in STD_LOGIC;
Clk : in STD_LOGIC;
Port ( Clk : in STD_LOGIC;
Trigger : out STD_LOGIC_VECTOR (7 downto 0);
DataOut :out STD_LOGIC_VECTOR (7 downto 0);
DataIn :out STD_LOGIC_VECTOR (7 downto 0);
DoneRx : out STD_LOGIC);
end RxOverlayer;
......@@ -14,11 +12,34 @@ architecture Behavioral of RxOverlayer is
TYPE STATE_TYPE IS (Idle, Start0, Start1, WaitTrigger, WaitData);
signal state : STATE_TYPE;
signal Data : STD_LOGIC_VECTOR (7 downto 0);
signal RxInt : STD_LOGIC;
signal RxSig : STD_LOGIC :='1';
signal TxSig : STD_LOGIC;
signal DataRdy : STD_LOGIC;
Component UART is
Port(Send : in STD_LOGIC;
DataIn : in STD_LOGIC_VECTOR(7 downto 0);
DataOut : out STD_LOGIC_VECTOR(7 downto 0);
RxInt : out STD_LOGIC;
Rx : in STD_LOGIC;
Tx : out STD_LOGIC;
Done : out STD_LOGIC;
Clk : in STD_LOGIC);
end component;
begin
FSMTransition : process(Clk)
begin
SERIAL : UART PORT MAP(
Send => '0',
DataIn => "00000000",
DataOut => Data,
RxInt => RxInt,
Rx => RxSig,
Tx => TxSig,
Done => DataRdy,
Clk => Clk
);
if Clk'event and Clk = '1' then
CASE state IS
WHEN Idle =>
......@@ -69,10 +90,9 @@ begin
Trigger <= Data;
DoneRx <= '0';
WHEN WaitData =>
DataOut <= Data;
DataIn <= Data;
DoneRx <= '1';
END CASE;
Data <= DataIn;
end if;
end process;
......
......@@ -58,153 +58,142 @@
<FileSets Version="1" Minor="31">
<FileSet Name="sources_1" Type="DesignSrcs" RelSrcDir="$PSRCDIR/sources_1">
<Filter Type="Srcs"/>
<File Path="$PSRCDIR/sources_1/new/Int_Color.vhd">
<File Path="$PSRCDIR/sources_1/new/BreakMABFSM.vhd">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/BreakMABFSM.vhd">
<File Path="$PSRCDIR/sources_1/new/ByteXFSM.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/ByteXFSM.vhd">
<File Path="$PSRCDIR/sources_1/new/Int_Address.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/clockGenerator.vhd">
<File Path="$PSRCDIR/sources_1/new/Int_Color.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/frameController.vhd">
<File Path="$PSRCDIR/sources_1/new/Int_GoboRot.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/frameFSM.vhd">
<File Path="$PSRCDIR/sources_1/new/Int_GoboWheel.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/SandBox.vhd">
<File Path="$PSRCDIR/sources_1/new/Int_Pan.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/BoardController.vhd">
<File Path="$PSRCDIR/sources_1/new/Int_Shutter.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/Int_GoboRot.vhd">
<File Path="$PSRCDIR/sources_1/new/Int_Tilt.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/Int_GoboWheel.vhd">
<File Path="$PSRCDIR/sources_1/new/RxFSM.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/Int_Pan.vhd">
<File Path="$PSRCDIR/sources_1/new/RxOverlayer.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/Int_Shutter.vhd">
<File Path="$PSRCDIR/sources_1/new/RxSystem.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/Int_Tilt.vhd">
<File Path="$PSRCDIR/sources_1/new/TxFSM.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/Int_Address.vhd">
<File Path="$PSRCDIR/sources_1/new/TxSystem.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/Board_Controller.vhd">
<File Path="$PSRCDIR/sources_1/new/UART.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/TxFSM.vhd">
<File Path="$PSRCDIR/sources_1/new/clockGenerator.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/GlobalComponent.vhd">
<File Path="$PSRCDIR/sources_1/new/frameController.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/RxSystem.vhd">
<File Path="$PSRCDIR/sources_1/new/frameFSM.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/UART.vhd">
<File Path="$PSRCDIR/sources_1/new/Main.vhd">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/SandBox.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/TxSystem.vhd">
<File Path="$PSRCDIR/sources_1/new/BoardController.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/RxFSM.vhd">
<File Path="$PSRCDIR/sources_1/new/Board_Controller.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
<File Path="$PSRCDIR/sources_1/new/RxOverlayer.vhd">
<File Path="$PSRCDIR/sources_1/new/GlobalComponent.vhd">
<FileInfo>
<Attr Name="AutoDisabled" Val="1"/>
<Attr Name="UsedIn" Val="synthesis"/>
......@@ -213,7 +202,7 @@
</File>
<Config>
<Option Name="DesignMode" Val="RTL"/>
<Option Name="TopModule" Val="Int_Color"/>
<Option Name="TopModule" Val="Main"/>
</Config>
</FileSet>
<FileSet Name="constrs_1" Type="Constrs" RelSrcDir="$PSRCDIR/constrs_1">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment