Name SMPTE80 ;
PartNo 00 ;
Date 07/01/2017 ;
Revision 01 ;
Designer Engineer ;
Company martin8or ;
Assembly None ;
Location None ;
Device g16v8a ;
/** Inputs **/
Pin 1 = clk; /* Counter clock */
Pin 8 = start; /* start count */
Pin 11 = !oe; /* Register output enable */
/** Outputs **/
Pin [19..13] = [Q6..0]; /* Counter outputs */
/** Declarations and Intermediate Variable Definitions **/
field count = [Q6..0]; /* declare counter bit field */
$define S0 'b'0000000 /* define counter states */
$define S1 'b'0000001
$define S2 'b'0000010
$define S3 'b'0000011
$define S4 'b'0000100
$define S5 'b'0000101
$define S6 'b'0000110
$define S7 'b'0000111
$define S8 'b'0001000
$define S9 'b'0001001
$define S10 'b'0001010
$define S11 'b'0001011
$define S12 'b'0001100
$define S13 'b'0001101
$define S14 'b'0001110
$define S15 'b'0001111
$define S16 'b'0010000
$define S17 'b'0010001
$define S18 'b'0010010
$define S19 'b'0010011
$define S20 'b'0010100
$define S21 'b'0010101
$define S22 'b'0010110
$define S23 'b'0010111
$define S24 'b'0011000
$define S25 'b'0011001
$define S26 'b'0011010
$define S27 'b'0011011
$define S28 'b'0011100
$define S29 'b'0011101
$define S30 'b'0011110
$define S31 'b'0011111
$define S32 'b'0100000
$define S33 'b'0100001
$define S34 'b'0100010
$define S35 'b'0100011
$define S36 'b'0100100
$define S37 'b'0100101
$define S38 'b'0100110
$define S39 'b'0100111
$define S40 'b'0101000
$define S41 'b'0101001
$define S42 'b'0101010
$define S43 'b'0101011
$define S44 'b'0101100
$define S45 'b'0101101
$define S46 'b'0101110
$define S47 'b'0101111
$define S48 'b'0110000
$define S49 'b'0110001
$define S50 'b'0110010
$define S51 'b'0110011
$define S52 'b'0110100
$define S53 'b'0110101
$define S54 'b'0110110
$define S55 'b'0110111
$define S56 'b'0111000
$define S57 'b'0111001
$define S58 'b'0111010
$define S59 'b'0111011
$define S60 'b'0111100
$define S61 'b'0111101
$define S62 'b'0111110
$define S63 'b'0111111
$define S64 'b'1000000
$define S65 'b'1000001
$define S66 'b'1000010
$define S67 'b'1000011
$define S68 'b'1000100
$define S69 'b'1000101
$define S70 'b'1000110
$define S71 'b'1000111
$define S72 'b'1001000
$define S73 'b'1001001
$define S74 'b'1001010
$define S75 'b'1001011
$define S76 'b'1001100
$define S77 'b'1001101
$define S78 'b'1001110
$define S79 'b'1001111
go1 = start ;
go2 = !start ;
/** Logic Equations **/
Sequenced count { /* free running counter */
present S0 if go1 next S1;
if go2 next S0;
present S1 if go1 next S2;
if go2 next S0;
present S2 if go1 next S3;
if go2 next S0;
present S3 if go1 next S4;
if go2 next S0;
present S4 if go1 next S5;
if go2 next S0;
present S5 if go1 next S6;
if go2 next S0;
present S6 if go1 next S7;
if go2 next S0;
present S7 if go1 next S8;
if go2 next S0;
present S8 if go1 next S9;
if go2 next S0;
present S9 if go1 next S10;
if go2 next S0;
present S10 if go1 next S11;
if go2 next S0;
present S11 if go1 next S12;
if go2 next S0;
present S12 if go2 next S13; /* Start input changes polarity */
if go1 next S0;
present S13 if go1 next S14; /* Start input changes polarity */
if go2 next S0;
present S14 if go1 next S15;
if go2 next S0;
present S15 if go1 next S16; /* Start input changes polarity */
if go2 next S0;
present S16 if go2 next S17; /* Start input changes polarity */
if go1 next S0;
present S17 if go2 next S18;
if go1 next S0;
present S18 if go2 next S19;
if go1 next S0;
present S19 if go2 next S20;
if go1 next S0;
present S20 if go2 next S21;
if go1 next S0;
present S21 if go2 next S22;
if go1 next S0;
present S22 if go2 next S23;
if go1 next S0;
present S23 if go2 next S24;
if go1 next S0;
present S24 if go2 next S25;
if go1 next S0;
present S25 if go2 next S26;
if go1 next S0;
present S26 if go2 next S27;
if go1 next S0;
present S27 if go2 next S28;
if go1 next S0;
present S28 if go2 next S29;
if go1 next S0;
present S29 if go2 next S30;
if go1 next S0;
present S30 if go2 next S31;
if go1 next S0;
present S31 if go2 next S32;
if go1 next S0;
present S32 if go2 next S33;
if go1 next S0;
present S33 if go2 next S34;
if go1 next S0;
present S34 if go2 next S35;
if go1 next S0;
present S35 if go2 next S36;
if go1 next S0;
present S36 if go2 next S37;
if go1 next S0;
present S37 if go2 next S38;
if go1 next S0;
present S38 if go2 next S39;
if go1 next S0;
present S39 if go2 next S40;
if go1 next S0;
present S40 if go2 next S41;
if go1 next S0;
present S41 if go2 next S42;
if go1 next S0;
present S42 if go2 next S43;
if go1 next S0;
present S43 if go2 next S44;
if go1 next S0;
present S44 if go2 next S45;
if go1 next S0;
present S45 if go2 next S46;
if go1 next S0;
present S46 if go2 next S47;
if go1 next S0;
present S47 if go2 next S48;
if go1 next S0;
present S48 if go2 next S49;
if go1 next S0;
present S49 if go2 next S50;
if go1 next S0;
present S50 if go2 next S51;
if go1 next S0;
present S51 if go2 next S52;
if go1 next S0;
present S52 if go2 next S53;
if go1 next S0;
present S53 if go2 next S54;
if go1 next S0;
present S54 if go2 next S55;
if go1 next S0;
present S55 if go2 next S56;
if go1 next S0;
present S56 if go2 next S57;
if go1 next S0;
present S57 if go2 next S58;
if go1 next S0;
present S58 if go2 next S59;
if go1 next S0;
present S59 if go2 next S60;
if go1 next S0;
present S60 if go2 next S61;
if go1 next S0;
present S61 if go2 next S62;
if go1 next S0;
present S62 if go2 next S63;
if go1 next S0;
present S63 if go2 next S64;
if go1 next S0;
present S64 if go2 next S65;
if go1 next S0;
present S65 if go2 next S66;
if go1 next S0;
present S66 if go2 next S67;
if go1 next S0;
present S67 if go2 next S68;
if go1 next S0;
present S68 if go2 next S69;
if go1 next S0;
present S69 if go2 next S70;
if go1 next S0;
present S70 if go2 next S71;
if go1 next S0;
present S71 if go2 next S72;
if go1 next S0;
present S72 if go2 next S73;
if go1 next S0;
present S73 if go2 next S74;
if go1 next S0;
present S74 if go2 next S75;
if go1 next S0;
present S75 if go2 next S76;
if go1 next S0;
present S76 if go2 next S77;
if go1 next S0;
present S77 if go2 next S78;
if go1 next S0;
present S78 if go2 next S79;
if go1 next S0;
present S79 if go1 next S0;
}
Name SMPTE 80 ;
PartNo 01 ;
Date 08/01/2017 ;
Revision 01 ;
Designer Engineer ;
Company martin8or ;
Assembly None ;
Location None ;
Device g16v8 ;
/* *************** INPUT PINS *********************/
pin 1 = clk ; /* */
Pin 8 = advance ; /* */
Pin 11 = GND ; /* */
/* *************** OUTPUT PINS *********************/
Pinnode [13..19] = [PD6..0];/* */
/* Design a four bit counter with a control signal advance .
If advance is high , counter is increased by one .pin 12 N.C on smpte pal is PD6 inverted. Feedback?*/
PD7 = !PD6 ;
FIELD count = [PD6..0] ;
sequence count {
$Repeat i=[0..79]
present {i}
if advance next {(i+1)%80};
$REPEND
}
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?