Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure syncGenerator(signal syncCounter : inout integer range 0 to 1023;
- signal syncOut,blank : out std_logic;
- constant frontPorch,backPorch,dataLen,syncWidth: in natural) is
- begin
- --If syncCounter is less than max--
- if(syncCounter < (frontPorch + backPorch + dataLen + syncWidth)) then
- --Increment--
- syncCounter <= (syncCounter + 1);
- --If syncCounter is less than max - syncWidth--
- if(syncCounter<(frontPorch + backPorch + dataLen)) then
- --SyncOut is high--
- syncOut <= '1';
- else
- syncOut <= '0';
- end if;
- --If syncCounter is greater than backPorch and less than backPorch + dataLen--
- if ((syncCounter > backPorch) and (syncCounter<(backPorch + dataLen))) then
- --Blank out is 0--
- blank <= '0';
- else
- blank <= '1';
- end if;
- --Else reset counter
- else
- syncCounter <= 0;
- end if;
- end syncGenerator;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement