Commit ecbb265e authored by Tristan Gingold's avatar Tristan Gingold

vtuCore: improve style.

parent 46d11795
......@@ -1225,7 +1225,6 @@ architecture vtuCore of vtuCore is
signal DataIn_2 : std_logic_vector(7 downto 0 );
signal Shifter2Ena : std_logic;
signal DataInHTSyncLess : std_logic_vector(7 downto 0 );
signal WindowDone : std_logic;
signal wValueOne_seq : std_logic;
signal BCoarseZero : std_logic;
signal SwitchOutput : std_logic;
......@@ -1366,20 +1365,6 @@ begin
Enabled => SyncLessEna,
SyncPulse => open);
B_RSFFSyncLessMux: entity work.RSFF
port map (Clk => Clk,
Set => StartSyncLess,
Clr => SetStartData,
Rst => Rst,
Q => SetStartData);
B_RSFFRunSyncLess: entity work.RSFF
port map (Clk => Clk,
Set => StartSyncLess,
Clr => SyncLessDisabled,
Rst => Rst,
Q => RunSyncLess);
B_PlayMemRunningFF: entity work.RSFF
port map (Clk => Clk,
Set => StartPlayMem,
......@@ -1517,6 +1502,8 @@ begin
COne(63 downto 0) <= (0=> '1', others => '0');
counterEnable <= (OE_B or OE_HT) and Run_seq;
process (Clk)
begin
if Clk'event and Clk = '1' then
......@@ -1530,15 +1517,13 @@ begin
process (PulseCount, wValue_effective)
begin
if unsigned(PulseCount) < unsigned(wValue_effective) then
WindowDone <= '0';
if InfiniteWindow = '1' or (unsigned(PulseCount) < unsigned(wValue_effective)) then
WindowDone_seq <= '0';
else
WindowDone <= '1';
WindowDone_seq <= '1';
end if;
end process;
WindowDone_seq <= WindowDone and (not InfiniteWindow);
process (wValue_effective)
begin
if wValue_effective = (63 downto 0 => '0') then
......@@ -1557,27 +1542,44 @@ begin
end if;
end process;
counterEnable <= (OE_B or OE_HT) and Run_seq;
wValueOne_seq <= (wValueOne or SinglePulseMode) and (not InfiniteWindow);
InfiniteWindow <= InfiniteWindowMode or LowFreqGenerationMode;
StartSyncLess <= Start and SyncLessOperationMode;
-- Pulse on Start when in syncless.
B_RSFFSyncLessMux: entity work.RSFF
port map (Clk => Clk,
Set => StartSyncLess,
Clr => SetStartData,
Rst => Rst,
Q => SetStartData);
process (DataOutHTSyncLess, SetStartData)
begin
case SetStartData is
when '0' =>
-- Loopback in normal mode.
DataInHTSyncLess <= DataOutHTSyncLess;
when others =>
-- On start
DataInHTSyncLess <= x"01";
end case;
end process;
StartSyncLess <= Start and SyncLessOperationMode;
SyncLessEna <= SyncLessOperationMode and (not RstOrStopSeq);
SyncLessDisabled <= not SyncLessEna;
process (Clk , RstOrStopSeq)
B_RSFFRunSyncLess: entity work.RSFF
port map (Clk => Clk,
Set => StartSyncLess,
Clr => SyncLessDisabled,
Rst => Rst,
Q => RunSyncLess);
process (Clk, RstOrStopSeq)
begin
if RstOrStopSeq = '1' then
ClkValueSwitch <= '0';
......@@ -1670,8 +1672,6 @@ begin
end if;
end process;
SyncLessEna <= SyncLessOperationMode and (not RstOrStopSeq);
FilledMuxSel <= (not RstOrStopSeq) and DataOutPulse;
StartPlayMem <= Start_i and PlayMemoryMode;
......
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