c = swap[0];
swap[0] = swap[1];
swap[1] = c;
return((tv & 0xF00F) | ((tv & 0x00F0) << 4) | ((tv & 0x0F00) >> 4));
}
short get_swap2(unsigned short tv, char *swap) {
char c;
c = swap[1];
swap[1] = swap[2];
swap[2] = c;
return((tv & 0xC3C3) | ((tv & 0x0C0C) << 2) | ((tv & 0x3030) >> 2));
}
short get_swap3(unsigned short tv, char *swap) {
char c;
c = swap[2];
swap[2] = swap[3];
swap[3] = c;
return((tv & 0x9999) | ((tv & 0x2222) << 1) | ((tv & 0x4444) >> 1));
}
short get_swap4(unsigned short tv, char *swap) {
char c;
c = swap[0];
swap[0] = swap[3];
swap[3] = c;
return((tv & 0xAA55) | ((tv & 0x00AA) << 7) | ((tv & 0x5500) >> 7));
}
short get_swap5(unsigned short tv, char *swap) {
char c;
c = swap[0];
swap[0] = swap[2];
swap[2] = c;
return((tv & 0xCC33) | ((tv & 0x00CC) << 6) | ((tv & 0x3300) >> 6));
}
Estas 5 operações devem acontecer em uma determinada ordem para que todas as permutações possíveis possam ser executadas. A função representada a baixo mostra a ordem em que estas operações devem acontecer para funções de 4 entradas.
void set_TVs(unsigned prog, unsigned short tv) {
int i = 0;
char swap[5] = "xyzw";
set_one_TV(prog,tv,swap);
tv = get_swap3(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap4(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap3(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap2(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap3(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap4(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap3(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap2(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap3(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap4(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap3(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap4(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap3(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap2(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap3(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap1(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap3(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap5(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap3(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap5(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap3(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap1(tv,swap);
set_one_TV(prog,tv,swap);
tv = get_swap3(tv,swap);
set_one_TV(prog,tv,swap);
}
A negação da saída é feita de maneira simples definindo a operação de equivalência NO, como é mostrado a seguir.
short get_out_neg(unsigned short tv) {
return (~(tv));
}
Etapa 2: Caracterização das ULGs e geração das funções lógicas
Neste etapa, cada ULG é caracterizada através de funções que simulam o funcionamento de multiplexadores, inversores e outras portas lógicas.
unsigned short tv_mux
(unsigned short tva, unsigned short tvb, unsigned short ct) {
return(~ct & tva | ct & tvb );
}
unsigned short select(unsigned prog,
unsigned short tv0, unsigned short tv2, unsigned short tv4, unsigned short tv6, unsigned short tv8, unsigned short tv10) {
unsigned short tva = 0 ;
switch(prog) {
case 0 : tva = tv0; break;
case 1 : tva = ~tv0; break;
case 2 : tva = tv2; break;
case 3 : tva = ~tv2; break;
case 4 : tva = tv4; break;
case 5 : tva = ~tv4; break;
case 6 : tva = tv6; break;
case 7 : tva = ~tv6; break;
case 8 : tva = tv8; break;
case 9 : tva = ~tv8; break;
case 10 : tva = tv10; break;
case 11 : tva = ~tv10; break;
otherwise: tva = TV_ZERO; break;
}
return(tva);
}
O exemplo da caracterização da ULG3 está descrito a seguir:
#define TV_ZERO 0
#define TV_ONE 0xFFFF
#define TV_X 0x00FF
#define TV_Y 0x0F0F
#define TV_Z 0x3333
#define TV_W 0x5555 for(prog=0; prog<65536; prog++) {
/* Mascara A - 1110000000000000 */
/* Mascara B - 0001110000000000 */
A = (prog&57344) >> 13;
B = (prog&7168) >> 10;
tva = select_in_mux12( A,TV_ZERO,TV_Z,TV_W,TV_X,TV_Y,0);
tvb = select_in_mux12( B,TV_ZERO,TV_Z,TV_W,TV_X,TV_Y,0);
tv_mux21 = tv_mux(tva,tvb,TV_Y);
/* Mascara C - 0000001110000000 */
/* Mascara D - 0000000001110000 */
C = (prog&896) >> 7;
D = (prog&112) >> 4;
tvc = select_in_mux12( C,TV_ZERO,TV_Z,TV_W,TV_X,TV_Y,0);
tvd = select_in_mux12( D,TV_ZERO,TV_Z,TV_W,TV_X,TV_Y,0);
tv_mux22 = tv_mux(tvc,tvd,TV_Y);
tv = tv_mux(tv_mux21,tv_mux22,TV_X );
fprintf(f,"Prog %d, tva %d, tvb %d, tvc %d, tvd %d, tv = %d\n", prog, tva, tvb, tvc, tvd, tv);
set_TVs((unsigned) prog,(unsigned short) tv);
tv=get_out_neg(tv);
set_TVs((unsigned) prog,(unsigned short) tv);
}
fclose(f);
}
Anexo 2
Comandos para o mapeamento das ULGs na ferramenta SIS
Script do mapeamento para LUTs de n entradas:
source script.rugged xl_part_coll –m –g 2 –n n xl_coll_ck –n n
xl_partition –m –n n simplify
xl_imp –n n
xl_partition –t –n n
xl_cover –e 30 –u 200 –n n xl_coll_ck –k –n n
Script do mapeamento para células da Actel sem a porta OR source script.rugged
act_map -o -h 3 -n 1 -q -d 4 -f 3 -M 4 -l -g 0.001
Bibliografia
[ACT 98] ACTEL CORPORATION. Introduction to Actel FPGA Architecture.
Disponível por WWW em http://www.actel.com. (nov. 1998).
[ALT 98a] ALTERA CORPORATION. Data Sheet. Disponível por WWW em http://www.altera.com (nov. 1998).
[ALT 98b] ALTERA CORPORATION. Advantages of EABs in FLEX10K devices.
Technical Brief 6. Disponível por WWW em http://www.altera.com (ago. 1998).
[AMS 98] AUSTRIA MIKRO SYSTEME INTERNATIONAL. AG. 0.8 µµµµm CMOS Joint Group Design Rules. 7 Digit Document #: 9931029. Revision #:
B. [S.l.]:Austria Mikro Systeme International, 1998.
[ATM 98] ATMEL CORPORATION. Data Sheet. Disponível por WWW em http://www.atmel.com (nov. 1998).
[AZE 96] AZEGAMI, Kengo; KASHIWAKURA, Shochiro; YAMASHITA, Koichi.
Flexible FPGA Architecture realized of General Purpose SOG. In:
ACM/SIGDA INTERNATIONAL SYMPOSIUM ON FIELD PROGRAMMABLE GATE ARRAYS, 1996. Proceedings… Los Alamitos : IEEE Computer Society, 1996.
[BAS 98] BASSAK, Gil. Focus Report: Programmable Logic. Disponível por WWW em http://www.isdmag.com (dez. 1998).
[BEH 95] BEHRENS, F. et al. Matriz Gate Array CMOS Avançada, Configurável por um Único Nível de Metal. (Advanced CMOS Gate Array Master-slice, Configurable by a Single Metal Layer). In: WORKSHOP IBERCHIP, 1., 1995, Cartegena de Indias, CO. Memorias… Santa Fé de Bogotá:
Centro de Publicaciones, Universidade de Los Andes, 1995. p. 259-270.
[BET 95] BETZ, Vaughn; ROSE, Jonathan. Using Architectural “Families”to increase FPGA Speed and Density. In: ACM/SIGDA INTERNATIONAL SYMPOSIUM ON FIELD PROGRAMMABLE GATE ARRAYS, 1995. Proceedings… Los Alamitos : IEEE Computer Society, 1995.
[BET 97] BETZ, Vaughn; ROSE, Jonathan. Cluster-Based Logic Blocks for FPGAs:
Area-Efficiency vs. Input Sharing and Size. In: CICC, 1997.
Proceedings…[S.l.:s.n.], 1997.
[BET 98] BETZ, Vaughn; ROSE, Jonathan. How Much Logic Should Go in an FPGA Logic Block? IEEE Design & Test of Computer, New York, v. 15, n.
1, 1998. Disponível por WWW em http://www.eecg.utoronto.ca/~jayar/
(ago. 1998).
[BEU 88] BEUNDER, M.A.; KERNHOF, J.P.; HOEFFLINGER, B. The CMOS Gate Forest: an Efficient and Flexible High-Performance ASIC Design Environment. IEEE Journal of Solid-State Circuits, New York, v.23, n.2, p.387-399, Apr.1988.
[BRA 87] BRAYTON, R. K.; RUDELL, R.; SANGIOVANNI-VICENTELLI, A.
WANG, A. MIS: A Multiple-Level Logic Optimization System. IEEE Transactions on Computer-Aided Design, New York, v. CAD-6, n. 6, 1987.
[BRY 86] BRYANT, R. Graph-Based Algorithms for Boolena Function Manipulation.
IEEE Transactions on Computer, New York, v. C-35, n. 8, 1986.
[BRO 92] BROWN, Stephen et al. Field Programmable Gate Arrays. Boston:
Klumer Academic Publishers, 1992.
[CAR 96] CARRO, L. et al. An environment to Design Digital Circuits Based on the Brazilian Gate-Array. In: WORKSHOP IBERCHIP, 2., 1996.
Memorias… São Paulo:[s.n.], 1996. p.198.
[CHI 98a] CHIP EXPRESS CORPORATION. Data Sheet. Disponível por WWW em http://www.chipexpress.com (nov. 1998).
[CHI 98b] CHIP EXPRESS CORPORATION. LPGAs – Reinventing Traditional Gate Array Value over FPGAs. Disponível por WWW em http://www.chipexpress.com (nov. 1998).
[DAV99] DAVILA, Eduardo; LIMA, Fernanda G.; REIS, Ricardo. EDIF to BLIF Converter. In: MICROELECTRONIC SEMINAR, 14., 1999.
Proceedings… Porto Alegre: UFRGS, 1999.
[DET 87] DETJENS, E. et al. Technology Mapping in MIS. In: ICCAD, 1987.
Proceedings… Los Alamitos : IEEE Computer Society, 1987. p. 116-119.
[DEV 94] DEVADAS, Srinivas; GHOSH, Abhijit; KEUTZER, Kurt William. Logic Synthesis, New York: Macgraw-Hill, 1994. 404 p.
[DON 93] DONG, S. K. et al. Two channel Routing Algorithms for Quick Customized Logic. In: EDAC, 1993. Proceedings… Los Alamitos : IEEE Computer Society, 1993. p. 122-126.
[EDI 99] ELECTRONIC DESIGN INTERCHANGE FORMAT. Documentation On-Line (EDIF Version 2 00, EDIF version 3 00 e EDIF version 4 00).
Disponível por WWW em http://www.edif.org (1999).
[EL-A89] EL-AYA, Khaled A. et al. A CMOS Electrically Configurable Gate Array.
IEEE Journal of solid-state Circuits, New York, v. 24, n. 3, June 1989.
[ERC 91] ERCOLANI, Silvia; DE MICHELI, Giovanni. Technology Mapping for Electrically Programmable Gate Arrays. In: DESIGN AUTOMATION CONFERENCE, 28., 1991. Proceedings … Los Alamitos : IEEE Computer Society, 1991.
[FIN 96] FINCO, S; CARRO, L. et al. Manual do projeto Ágata - Ambiente para Projeto de Circuitos Digitais com Gate Array Brasileiro. Campinas:
CTI - Instituto de Microeletrônica, 1996. Relatório Técnico.
[FRA 91] FRANCIS, Robert; ROSE, Jonathan; VRANESIC, Zvonko. Chortle-crf: Fast Technology Mapping for Lookup Table-based FPGAs. In: DESIGN AUTOMATION CONFERENCE, 28., 1991. Proceedings… Los Alamitos : IEEE Computer Society, 1991.
[GÜN 91] GÜNTZEL, J.; RIBAS, R.; REIS, R. MARCELA: Uma nova abordagem para pré-difundidos. In: SBMICRO, 1991. Anais… Belo Horizonte : SBMICRO, 1991.
[GÜN 95] GÜNTZEL, J. L. et al. A Novel Approach for ASIC Layout Generation. In:
MIDWEST SYMPOSIUM ON CIRCUITS AND SYSTEMS, 38., 1995.
Proceedings… Piscataway : UFRJ, IEEE Circuits and Systems Society, 1996. p.791-794.
[HIN 98] HINSBERGER, Uwe; KOLLA, Reiner. Boolean Matching for large Libraries.
In: DESIGN AUTOMATION CONFERENCE, 35., 1998. Proceedings
… Los Alamitos : IEEE Computer Society, 1998.
[HOP 99] HOPKIN, Vince. Programmable Device or Gate Array? Disponível por WWW em http://www.isdmag.com (jan., 1999).
[HSP 96] HSPICE. User manual: Application and Examples. [S.l.] : Meta-software, 1996. v. 3.
[HUT 99] HUTTON, Michael et al. Characterization and Parameterized Generation of Synthetic Combinational Benchmark Circuits. Disponível por WWW em http://www.eecg.utoronto.ca/~jayar (1999).
[JAC 96] JACOBI, Ricardo. Síntese de Circuitos Lógicos Combinacionais.
Campinas: Instituto de Computação/UNICAMP, 1996. 170p. Trabalho apresentado na Escola de Computação, 10., 1996, Campinas.
[JOH 97] JOHANN, M.; CARRO, L.; REIS, R. Functional Design of GAROTA: Gate Array Router of ÁGATA System. In: BRAZILIAN SYMPOSIUM ON INTEGRATED CIRCUIT DESIGN, 10., 1997, Gramado, RS.
Proceedings… Porto Alegre: CPGCC da UFRGS. 1997. p. 21-30.
[JOH 99] JOHANN, Marcelo; REIS, Ricardo. Automatic Master-Slice Generation with GAROTA Version Beta 2.5. In: MICROELECTRONIC SEMINAR, 14., 1999. Proceedings… Porto Alegre: UFRGS, 1999.
[KAR 90] KARPLUS, Kevin. Using if-then-else DAGs to do Technology Mapping for Field Programmable Gate Arrays. [S.l.:s.n.], 1990. (Technical Report, UCS-CRL-90-43).
[KAR 91a] KARPLUS, Kevin. Amap: a Technology Mapper for Selector-based Field Programmable Gate Arrays. In: DESIGN AUTOMATION CONFERENCE, 28., 1991. Proceedings … Los Alamitos : IEEE Computer Society, 1991.
[KAR 91b] KARPLUS, Kevin. Xmap: a Technology Mapper for Table-lookup Field Programmable Gate Arrays. In: DESIGN AUTOMATION CONFERENCE, 28., 1991. Proceedings … Los Alamitos : IEEE Computer Society, 1991.
[KIN 96] KINDEL, M.; CARRO, L.; REIS, R. EDIF 200 Parser Development. In:
MICROELECTRONIC SEMINAR, 10., 1996. Proceedings… Porto Alegre: CPGCC da UFRGS, 1996. p. 149-152.
[LAI 96] LAI, Yen-Tai; PAN, Kuo-Rueih R.; PEDRAM, Massoud. OBDD-Based Function Decomposition: Algorithms and Implementation. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, New York, v. 15, n. 8, Aug. 1996.
[LAI 97] LAI, Yen-Tai; WANG, Ping-Tsung. Hierarchical Interconnection Structures for Field Programmable Gate Arrays. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, New York, v. 5, n. 2, June 1997.
[LIM 98a] LIMA, Fernanda G. et al. On the Applicability of Universal Logic Gates for Designing Masked Programmable Gate Array Architectures. In:
WORKSHOP IBERCHIP, 4., 1998, Mar del Plata, Ar. Memorias…
Buenos Aires: Universidad de Buenos Aires, Facultad de Ingenieria, 1998.
[LIM 98b] LIMA, Fernanda G. et al. Improving Logic Density of QCL Masterslices by Using Universal Logic Gates. In: BRAZILIAN SYMPOSIUM ON INTEGRATED CIRCUIT DESIGN, 11., 1998, Búzios, RJ.
Proceedings… Los Alamitos : IEEE Computer Society, 1998. 250 p.
[LIM 99a] LIMA, Fernanda G. et al. Designing Masked Programmable ULGs for MPGAs. In: WORSHOP IBERCHIP, 4., 1999. Memorias… [LIMA : HOZLO S.R.L.], 1999. 508 p. Disponível por WWW em http://www.inf.ufrgs.br/ ~fglima/maragata.html
[LIM 99b] LIMA, Fernanda et al. Programa_de_TV Tool. In: MICROELECTRONIC SEMINAR, 14., 1999. Proceedings… Porto Alegre: UFRGS, 1999.
[LIN 94] LIN, Chih-Chang; MAREK-SADOWSKA, Malgorzata; GATLIN, Duane.
Universal Logic Gate for FPGA Design. In: ICCAD, 1994.
Proceedings… Los Alamitos : IEEE Computer Society, 1994.
[LIN 97] LIN, Chih-Chang; MAREK-SADOWSKA, Malgorzata; GATLIN, Duane. On Designing Universal Logic Gate and their Application to FPGA Design. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, New York, v. 16, n. 5, May 1997.
Disponível por WWW em http://guitar.ece.ucsb.edu
[MOR 93] MORAES, F. G.; AZEMARD, N.; ROBERT, M. and AUVERGNE, D.
Flexible Macrocell Layout Generator. In: ACM/SIGDA PHYSICAL DESIGN WORSHOP, 4., 1993, Los Angeles, USA. Proceedings…
[S.l.:s.n.], 1993. p. 105-116.
[MOR 96] MORAES, F. G.; GONÇALVES, P. Placement inside Ágata. In:
MICROELECTRONIC SEMINAR, 11., 1996. Proceedings… Porto Alegre: CPGCC da UFRGS. 1996. p. 127-128.
[MUR 90] MURGAI, Rajeev et al. Logic Synthesis for Programmable Gate Arrays. In:
DESIGN AUTOMATION CONFERENCE, 27., 1990. Proceedings…
Los Alamitos : IEEE Computer Society, 1990.
[MUR 92] MURGAI, Rajeev et al. An Improved Synthesis Algorithm for Multiplexor-based PGA’s. In: DESIGN AUTOMATION CONFERENCE, 29., 1992. Proceedings… Los Alamitos : IEEE Computer Society, 1992.
[NOI 85] NOIJE, Wilhelmus A. M.; DECLERCK, G. J. Advanced CMOS gate array architecture combining gate isolation and programming routing channel.
IEEE Solid-State Circuits, New York, v. 21, n.2, p.228-233, Apr.
1986.
[OBR 99] OBRYANT, Greg. Practical Design for XILINX Seminar. Porto Algre, Escola de Engenharia, Departamento de Engenharia Elétrica da UFRGS, 17 e 18 de fevereiro 1999.
[QUI 98] QUICKLOGIC CORPORATION. Data Sheet. Disponível por WWW em http://www.quicklogic.com. (nov. 1998).
[RAB 96] RABAEY, Jan. Digital Integrated Circuits - A Design Perspective. Upper Saddle River : Prentice Hall, 1996. 702 p.
[REI 92] REIS, André I.; GÜNTZEL, José L.; RIBAS, Renato R. Algumas formas de Implementação de ASICs. In: BRAZILIAN SYMPOSIUM ON INTEGRATED CIRCUIT DESIGN, 11., 1992, Rio de Janeiro. Anais…
Rio de Janeiro : SBC, 1992. p.35-48.
[RUD 96] RUDELL, Richard. Tutorial: Design of Logic Synthesis System. In:
DESIGN AUTOMATION CONFERENCE, 33., 1996. Proceedings…
Los Alamitos : IEEE Computer Society, 1996.
[SEN 92] SENTOVICH, E. et al. SIS: A System for Sequential Circuit Synthesis, [S.l:s.n.], 1992. (Memorandum No. UCB/ERL M92/41).
[SIM 92] SIMÕES, S. A. et al. Matriz gate array cmos avançada, configurável por um único nível de metal. In: SBMICRO, 7., 1992. São Paulo, SP. Anais…
São Paulo : SBMICRO, 1992. p. 281-291.
[SKA 96] SKAHILL, Kevin. VHDL for Programmable Logic. [S.l.] : Addison Wesley. 1996, p. 1-23.
[SYN 98] SYNOPSYS. Product Literature. Disponível por WWW em http:
//www.synopsys.com. (nov. 1998).
[TAN 98] TANNER RESEARCH INC. EDA Tools. Disponível por WWW em http://www.tanner.com (nov. 1998).
[THA 95] THAKUR, S.; WONG, D.F. On Designing ULM-Based FPGA Logic Modules. In: ACM/SIGDA INTERNATIONAL SYMPOSIUM ON FIELD PROGRAMMABLE GATE ARRAYS, 1995. Proceedings…
Los Alamitos : IEEE Computer Society, 1995. Disponível por WWW em http://www.cs.utexas.edu/users/cad/cad.html
[WES 93] WESTE, Neil H. E.; KAMRAN, E. Principles of CMOS VLSI Design. 2.
ed. Reading, Massachusetts : Addison - Wesley Publishing Company, 1992. 713p.