13
Lab 6: Traffic Light Controller 鄭鄭鄭, [email protected] EC616 鄭鄭鄭, [email protected] EC616 1. Open a new project by issuing “File -> New Project”. i. Click 鄭 7-1

Lab6-2006(Traffic Light Controller)

Embed Size (px)

Citation preview

Page 1: Lab6-2006(Traffic Light Controller)

Lab 6: Traffic Light Controller

鄭宇順, [email protected] EC616

巫仁傑, [email protected] EC616

1. Open a new project by issuing “File -> New Project”.

i. Click 下一步

7-1

Page 2: Lab6-2006(Traffic Light Controller)

ii. Click 下一步iii. Click 下一步iv. Click 下一步v. Click 完成

2. Create a new module by issuing “Project > New Source”

Create a verilog file “traffic_light.v” .

(You can copy it from the class handout)

7-2

Page 3: Lab6-2006(Traffic Light Controller)

3. Save the file and issue “Synthesis-> Check syntax” by doubling click.

7-3

Page 4: Lab6-2006(Traffic Light Controller)

4. Create the schematic symbol of the module “traffic_light.v” by doubling click.

5. If no syntax error, create a new verilog module by issuing “Project > New

Source”. Create a verilog file “bc_4b_ce_aclr.v”

7-4

Page 5: Lab6-2006(Traffic Light Controller)

6. Start HDL Editor and create macro for a 4-bit binary counter with a clock enable

and an asynchronous reset inputs.

7. Save the file and issue “Synthesis-> Check syntax” by double click.

7-5

Page 6: Lab6-2006(Traffic Light Controller)

8. Create the schemaric symbol of the module “bc_4b_ce_aclr.v” by doubling click.

9. Create another module named “clk12Hz“ to generate 11.9 Hz clock, check

syntax and then create the symbol of the module “clk12Hz“.

7-6

Page 7: Lab6-2006(Traffic Light Controller)

10. In Project Manager window, issue “Project -> New Source”.

Create a schematic file named “trf_ltc”.

7-7

Page 8: Lab6-2006(Traffic Light Controller)

11. In Schematic Editor window ”Xilinx ESC”, create your design at here.

7-8

Page 9: Lab6-2006(Traffic Light Controller)

12. In addition, assign input and output pads to appropriate pins of the FPGA.

Double click “trf_ltc_pin.ucf”.

7-9

Page 10: Lab6-2006(Traffic Light Controller)

13. Simulate, implement and download your design.

Requirements:A. Design a two-way traffic light controller.

H

7-10

Ggg?HG

Page 11: Lab6-2006(Traffic Light Controller)

F

B. Refer to the FSM as shown in class-handout.

C. Design clock, counter and controller modules using verilog code.

D. The top module must implemented in schematic design, cannot use verilog code.

(Pin connection:)

CAR -> P62

HG -> p5

HY -> p4

HR -> p3

FG- > p9

FY -> p8

FR -> p6

7-11