home *** CD-ROM | disk | FTP | other *** search
- Name Count13;
- Partno CA0013;
- Date 11/27/84;
- Rev 01;
- Designer Kahl;
- Company Assisted Technology;
- Assembly None;
- Location None;
-
- /****************************************************************/
- /* */
- /* Thirteen Bit Counter */
- /* */
- /* 13-bit synchronous counter with parallel load, clear, and */
- /* hold capability. The LOAD operation loads the inputs */
- /* (D12-D0) into the output register (Q12-Q0). The HOLD */
- /* operation holds the previous value regardless of clock */
- /* transitions. The CARRY is true (co=HI) when the output */
- /* register (Q12-Q0) is all HIGHs, otherwise false (co=LO). */
- /* The HALF-CARRY is true (hc=HI) when the all but the most */
- /* significant output register (Q11-Q0) is all HIGHs, otherwise */
- /* false (hc=LO). */
- /****************************************************************/
- /** Allowable Target Device Types : PAL32R16 */
- /****************************************************************/
-
- /** Inputs **/
-
- pin [16,36] = [clk1,clk2]; /* Register Clocks */
- pin [15,35] = ![pl1,pl2]; /* Register Preload Pins */
- pin [25,5] = ![oe1,oe2]; /* Register Output Enables */
- pin [32..34] = [instr0..2]; /* Instruction Type Inputs */
- pin [6..9,11..14,26..29,31] = [D0..12]; /* Data Inputs */
-
- /** Outputs **/
-
- pin 24 = so; /* Something Output */
- pin 38 = carry; /* Carry Output */
- pin 40 = half_carry; /* Half Carry Output (Q0-11) */
- pin [1,3,17,19,21,23,22,20,18,4,2,37,39] = [Q0..12];
-
- /** Declarations and Intermediate Variable Definitions **/
-
- field instruction = [instr2..0];/* Instruction Field */
- count = instruction:4;
- hold = instruction:5; /* Operation Types */
- load = instruction:6;
- field Q = [Q12..0];
- field D = [D12..0];
- $define BIT0 'h'1
- $define BIT1 'h'2
- $define BIT2 'h'4
- $define BIT3 'h'8
- $define BIT4 'h'10
- $define BIT5 'h'20
- $define BIT6 'h'40
- $define BIT7 'h'80
- $define BIT8 'h'100
- $define BIT9 'h'200
- $define BIT10 'h'400
- $define BIT11 'h'800
- $define BIT12 'h'1000
- field output = [Q0..2];
-
- /** Logic Equations **/
-
- carry.d = count & [Q0..12]:& ;
-
- half_carry.d = count & [Q0..11]:& ;
-
- so.d = D0 & output:0 # D1 & output:1
- # D2 & output:2 # D3 & output:3
- # D4 & output:4 # D5 & output:5
- # D6 & output:6 # D7 & output:7;
-
- Q.d = load & (BIT0 & D0
- # BIT1 & D1
- # BIT2 & D2
- # BIT3 & D3
- # BIT4 & D4
- # BIT5 & D5
- # BIT6 & D6
- # BIT7 & D7
- # BIT8 & D8
- # BIT9 & D9
- # BIT10 & D10
- # BIT11 & D11
- # BIT12 & D12)
- # hold & (BIT0 & Q0
- # BIT1 & Q1
- # BIT2 & Q2
- # BIT3 & Q3
- # BIT4 & Q4
- # BIT5 & Q5
- # BIT6 & Q6
- # BIT7 & Q7
- # BIT8 & Q8
- # BIT9 & Q9
- # BIT10 & Q10
- # BIT11 & Q11
- # BIT12 & Q12)
- # count & (BIT0 & (Q0 $ 'b'1)
- # BIT1 & (Q1 $ Q0)
- # BIT2 & (Q2 $ [Q0..1]:&)
- # BIT3 & (Q3 $ [Q0..2]:&)
- # BIT4 & (Q4 $ [Q0..3]:&)
- # BIT5 & (Q5 $ [Q0..4]:&)
- # BIT6 & (Q6 $ [Q0..5]:&)
- # BIT7 & (Q7 $ [Q0..6]:&)
- # BIT8 & (Q8 $ [Q0..7]:&)
- # BIT9 & (Q9 $ [Q0..8]:&)
- # BIT10 & (Q10 $ [Q0..9]:&)
- # BIT11 & (Q11 $ [Q0..10]:&)
- # BIT12 & (Q12 $ [Q0..11]:&));
-