1 / 23

Semáforo Versión .TDF AHDL

reloj100ms. rojo1. amarillo1. y. semáforo. verde1. rojo2. amarillo2. reset. verde2. Semáforo Versión .TDF AHDL. Bloque de objetos ( entradas y salidas ). Esquema de funcionamiento. Diagrama de estados semáforo (Moore). r1,a2. 0. 0. S 1. 0 día 1 noche. S 0. v1,r2. 1. S 2.

Télécharger la présentation

Semáforo Versión .TDF AHDL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. reloj100ms rojo1 amarillo1 y semáforo verde1 rojo2 amarillo2 reset verde2 Semáforo Versión .TDF AHDL Bloque de objetos ( entradas y salidas )

  2. Esquema de funcionamiento

  3. Diagrama de estados semáforo(Moore) r1,a2 0 0 S1 0 día 1 noche S0 v1,r2 1 S2 0,0 0 0 r1,r2 1 1 0 a1,r2 S3 S6 1 0 S4 1 0 0 r1,r2 1 1 S7 S5 1 0 r1,v2 a1,a2

  4. % N If case S0 30 Salida FF If case S1 180 If case S2 30 BLOQUE COMBINATORIO salida[5..0] If case S3 30 IfCuenta.data[7..0]= Cuenta.q[7..0] If case S4 180 BLOQUE SEC If case S5 30 Semáforo: Entradas y salidas , procesos, Variables y nodos AHDL Xtal 8 Mhz Entradadatos[7..0] Cuenta.data[7..0] LPM_counter cuenta IF CASE Cuenta.q[7..0] reloj100ms FFD Cuenta.q[7..0] D Entradadatos[7..0] table SS y Dia /noche reset relojmáquina R1,A1,V1,R2,A2,V2

  5. Esquemáticos

  6. Esquemáticos

  7. AHDL Subdesign SUBDESIGN semaforo2 ( reloj100ms, y, reset : INPUT; rojo1, rojo2, amari1, amari2, verde1, verde2 : OUTPUT; )

  8. AHDL Variables y Nodos internos VARIABLE cuenta: lpm_counter WITH ( LPM_WIDTH=8); ss: MACHINE WITH STATES (s0, s1, s2, s3, s4, s5, s6, s7); salida[5..0], entradacontador[7..0], relojmaquina : NODE; borrar : NODE; salidaff : DFF; BEGIN

  9. Proceso Table TABLE % estado entrada salida proximo % % actual actual actual estado % ss, y => salida[], ss; s0, 0 => B"100100", s1; s1, 0 => B"001100", s2; s2, 0 => B"010100", s3; s3, 0 => B"100100", s4; s4, 0 => B"100001", s5; s5, 0 => B"100010", s0; s6, 0 => B"010010", s0; s7, 0 => B"000000", s0; s0, 1 => B"100100", s7; s1, 1 => B"001100", s7; s2, 1 => B"010100", s7; s3, 1 => B"100100", s7; s4, 1 => B"100001", s7; s5, 1 => B"100010", s7; s6, 1 => B"010010", s7; s7, 1 => B"000000", s6; END TABLE;

  10. Proceso IF CASE CASE salida [] IS WHEN B"100100" => entradacontador[] = H"1E"; WHEN B"001100" => entradacontador[] = H"B4"; WHEN B"010100" => entradacontador[] = H"1E"; WHEN B"100100" => entradacontador[] = H"1E"; WHEN B"100001" => entradacontador[] = H"B4"; WHEN B"100010" => entradacontador[] = H"1E"; WHEN B"010010" => entradacontador[] = H"0A"; WHEN B"000000" => entradacontador[] = H"0A"; END CASE;

  11. Proceso IF ELSE salidaff.clk = reloj100ms; cuenta.clock = reloj100ms; cuenta.sclr = borrar; cuenta.data[] = entradacontador[]; IF cuenta.q[7..0] < entradacontador[7..0] THEN salidaff.d = GND; borrar = GND; ELSE borrar = VCC; salidaff.d = VCC; END IF; % Fin etapa programador de tiempo % relojmaquina = salidaff.q;

  12. salidas rojo1 = salida[5]; amari1 = salida[4]; verde1 = salida[3]; rojo2 = salida[2]; amari2 = salida[1]; verde2 = salida[0];

  13. LPM_Counter • LPM_WIDTH Integer Yes The number of bits in the count, or the width of the q[] and data[] ports, if they are used. • LPM_DIRECTION String No Values are "UP", "DOWN", and "UNUSED". If the LPM_DIRECTION parameter is used, the updown port cannot be connected. When the updown port is not connected, the default for the LPM_DIRECTION parameter is "UP".

  14. FFD

  15. Simulación: Estados (detalle)

  16. Simulación: Estados • Los estados rojo-amarillo y verde -amarillo duran 3 s el estado rojo-verde dura 18 seg. (diurno) Intervalo rojo verde

  17. Floorplan

  18. EPM7128

  19. ARQUITECTURA MAX 7000

  20. macrocelda

  21. I/0

  22. JTAG

  23. Conectory señales JTAG

More Related