Thiết kế, mô phỏng hệ thống tính điểm trong trò chơi Bowling

17 446 4
  • Loading ...
1/17 trang

Thông tin tài liệu

Ngày đăng: 12/10/2015, 19:09

Thiết kế, mô phỏng hệ thống tính điểm trong trò chơi Bowling kèm code,Bài tập lớn Thiết kế hệ thống số Thầy Cường VLĐiện tử 1 K55 Đại học Bách Khoa Hà Nội .Thiết kế, mô phỏng hệ thống tính điểm trong trò chơi Bowling kèm code, Bowling Score KeeperGroup 5Đ ặ n g H ồ n g LU Ậ TPHAN ĐÌNH ĐÔNGVŨ VĂN ĐẠI Click icon to add pictureINTROIntroduction to Bowling How we play? How it work?- Each time we play, it’s called a game- Each game has 10 frames- Each frame has 2 throws (10 pins)- Frame is scored as the total number of pins knocked down during that frame- 10 pins down knocked down in 1st throw Strike plus number of pins knocked down next 2 throws- 10 pins down knocked down in 2nd throw Spare plus number of pins knocked down next throw- If it’s your last throw, then, you get bonus round(s) for Strike and Spare instead- Game score is the sum of the number of pins knocked down plus bonuses for strike and spare Click icon to add pictureTop-level DesignDesigning top-level of Bowling Score Keeper Module SolutionsLower-levelSignalCharacteristics:Modules:Inputs:-NReceiveAPD4blogicbinaryN (4b)Receivenumber,andFTUPDonly(FirstfromchangeThrow)pin machinevaluessignal whenand giveplayer’sAPD (AllmadePinsa newknockedthrowsDown) signal- UPDScoreOnlyRegistergoesReceivehighwhenAD new(Add)throwssignal,havethenbeenadd Nmade(Number of pins knocked down) to game scoreN Numberof pinsknockeddown(Score)UPDGoesGoeshighwhenis made-- FThighwhenit’sthrow1st throw- Frame counter Receive NF (Next Frame) signal and give us LF (Last Frame) signalOutputs:- APD Goes high when all pins are knocked down- Control Receive UPD (N value has been updated) and N, then give us FT, AD, NF and Done (Game is-- Score(10b)Gamedisplaysdone)signalsNF GoeshighwhenScorecurrentframeasisBCDdonevalue (rather than binary)-- DoneGoeswhengame is finishedLF Goeshighhighin lastframeAdditionalSignals:- AD 1b binary,give Score Register ‘add command’ we have to control AD length, so we can controlbonus scores- CLK Clock signal- RST Reset signal Top-level Design Simulation Click icon to add pictureLower-level DesignDesigning Lower-level modules(Controller – APD logic – Score Register – Frame Counter) APD Logic Frame Counter Score Register ControllerFT and NF Generator ControllerFrame States- StatesCurrent SateUPDAPDLFCLRBonusNext State000xxx00000010xx010100110x110000111x1110010xxx000101100x010001101x011101110x100001111x1010100xxx0010101xx00110101xx1011111xxxx0011◦◦◦◦00 – 1st Throw01 – 2nd Throw10 – Bonus11 – Done- Bonus◦◦◦◦00 – None01 – Normal10 – Spare11 – Strike- CLR All Bonuses is cleared ControllerBonus States- State◦◦◦00 – Normal01 – Spare/Strike 110 – Strike 1 + Strike 2- Bonus◦◦◦◦00 – None01 – Normal10 – Spare11 – Strike- ADD◦◦◦◦00 – N x 0 AD’s length = 001 – N x 1 AD’s length = 110 – N x 2 AD’s length = 211 – N x 3 AD’s length = 3Current StateBonus RoundBonusADDNext State000000000000010100000100101000110110001000000001010000001100000001110000010000001010011000101010010101110100110000010110101000111001000111101001000000101000110011001010x1001110111010000101010101011011001011011101011100000111100111011101011x110111111111000011111011001111101001111111001 Controller Click icon to add pictureTHE ENDThank you
- Xem thêm -

Xem thêm: Thiết kế, mô phỏng hệ thống tính điểm trong trò chơi Bowling, Thiết kế, mô phỏng hệ thống tính điểm trong trò chơi Bowling, Thiết kế, mô phỏng hệ thống tính điểm trong trò chơi Bowling

Từ khóa liên quan

Gợi ý tài liệu liên quan cho bạn