![]() X starts wtih a value of maximum width of screen (640) and decrements by 1 at every posedge moveClk. The Y is set to GroundY at default because it only moves from right to left. Similar to TRexDelegate, this module contains a instantaneous X coordinate of the cactus. The original design was to have three cactus randomly generating with a certain distance interval, however, due to the limitation of ports on FPGA board, we moved to one cactus only. This module manages all cactus obstacles. Note*: GroundY is the default Y value of TRex and obstacles Obstacle Delegate By implementing actual acceleration formula in physics. In addition to calling two other modules dinoFSM and drawDino which are in charge of TRex pattern selection and vga graphic drawing, the module also takes care of TRex's jump movement. The module has local variable storing the information including dinosaur origin's X and Y coordinates, its width and height. The TRex delegate module controls everything about the TRex. If current pixel is in both poatterns, then the game knows a collision has happened. Dead state: Movements are paused, score increment is paused, and TRex is set to dead pattern.īecause the VGA module keeps returning a x and y coordinate representing the current pixel the counter is pointing at, I used these two value to determine if current pixel is in TRex pattern and also in obstacle pattern.TRex has normal animation (refer to chrome://dino) ![]() In game state: Objects start to move at a specified game speed, score starts to increment.Initial state: Objects are rest to their initial position, TRex is reset to the default pattern, and score is cleared to zero.The module takes raw inputs from the Nexys3 FPGA board including four buttons and generates proper output signals to VGA and some led indicators. This is the top module of the entire project. Due to the limitation of port numbers on Nexys3, we might encounter problems that are caused by the actual hardware, therefore, some unnecessary features or relatively insignificant modules might be cut off in order to decrease the total hardware resource used by the program. We will utilize only three buttons on the board as the raw user input, and output to a 640x480 60FPS display through the VGA port. The goal is to mimick the game mechanism, graphics, and game rules, etc, as close as possible compared to the original version. This project aims to implement Google Chrome's TRex mini game to FPGA board with the Verilog programming language. Circuit diagrams were previously used to specify the configuration, but this is increasingly rare due to the advent of electronic design automation tools. The FPGA configuration is generally specified using a hardware description language (HDL), similar to that used for an application-specific integrated circuit (ASIC). A field-programmable gate array (FPGA) is an integrated circuit designed to be configured by a customer or a designer after manufacturing – hence the term "field-programmable".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |