Soumettre la recherche
Mettre en ligne
Fpga 09-behavioral-modeling-moore-machine
•
Télécharger en tant que PPT, PDF
•
0 j'aime
•
439 vues
Malik Tauqir Hasan
Suivre
Périphériques & matériel
Signaler
Partager
Signaler
Partager
1 sur 8
Télécharger maintenant
Recommandé
Resolution method in AI.pptx
Resolution method in AI.pptx
Abdullah251975
Divide and conquer
Divide and conquer
ramya marichamy
Transactions in dbms
Transactions in dbms
Nancy Gulati
Lecture set 4
Lecture set 4
Gopi Saiteja
Kerberos authentication
Kerberos authentication
Suraj Singh
Public key algorithm
Public key algorithm
Prateek Pandey
Knapsack problem algorithm, greedy algorithm
Knapsack problem algorithm, greedy algorithm
HoneyChintal
2 phase locking protocol DBMS
2 phase locking protocol DBMS
Dhananjaysinh Jhala
Recommandé
Resolution method in AI.pptx
Resolution method in AI.pptx
Abdullah251975
Divide and conquer
Divide and conquer
ramya marichamy
Transactions in dbms
Transactions in dbms
Nancy Gulati
Lecture set 4
Lecture set 4
Gopi Saiteja
Kerberos authentication
Kerberos authentication
Suraj Singh
Public key algorithm
Public key algorithm
Prateek Pandey
Knapsack problem algorithm, greedy algorithm
Knapsack problem algorithm, greedy algorithm
HoneyChintal
2 phase locking protocol DBMS
2 phase locking protocol DBMS
Dhananjaysinh Jhala
Stack Operation In Data Structure
Stack Operation In Data Structure
DivyeshKumar Jagatiya
B trees
B trees
PRAKASH RANJAN SINGH
Unit 6
Unit 6
Abha Damani
Two one Problem artificial intelligence
Two one Problem artificial intelligence
Wasim Raza
Skip lists (Advance Data structure)
Skip lists (Advance Data structure)
Shubham Shukla
8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems
Dr Sandeep Kumar Poonia
Combinational circuit
Combinational circuit
chauhankapil
Distributed concurrency control
Distributed concurrency control
Binte fatima
Cat database
Cat database
tubbeles
Digital Logic
Digital Logic
Dilum Bandara
Rehashing
Rehashing
rajshreemuthiah
Cryptographic protocols
Cryptographic protocols
Vrushali Lanjewar
Transaction
Transaction
Amin Omi
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
Md. Shafiuzzaman Hira
Verilog operators
Verilog operators
Dr.YNM
Asset Monitoring with Beacons, Lora, NodeJS and IoT Cloud
Asset Monitoring with Beacons, Lora, NodeJS and IoT Cloud
Robert van Mölken
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Stavros Vassos
Hashing .pptx
Hashing .pptx
ParagAhir1
Transaction Processing Concept
Transaction Processing Concept
Nishant Munjal
Quantum_Safe_Crypto_Overview_v3.pdf
Quantum_Safe_Crypto_Overview_v3.pdf
RonSteinfeld1
Digital System Design-Synchronous Sequential Circuits
Digital System Design-Synchronous Sequential Circuits
Indira Priyadarshini
Verilog_Examples (1).pdf
Verilog_Examples (1).pdf
DrViswanathKalannaga1
Contenu connexe
Tendances
Stack Operation In Data Structure
Stack Operation In Data Structure
DivyeshKumar Jagatiya
B trees
B trees
PRAKASH RANJAN SINGH
Unit 6
Unit 6
Abha Damani
Two one Problem artificial intelligence
Two one Problem artificial intelligence
Wasim Raza
Skip lists (Advance Data structure)
Skip lists (Advance Data structure)
Shubham Shukla
8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems
Dr Sandeep Kumar Poonia
Combinational circuit
Combinational circuit
chauhankapil
Distributed concurrency control
Distributed concurrency control
Binte fatima
Cat database
Cat database
tubbeles
Digital Logic
Digital Logic
Dilum Bandara
Rehashing
Rehashing
rajshreemuthiah
Cryptographic protocols
Cryptographic protocols
Vrushali Lanjewar
Transaction
Transaction
Amin Omi
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
Md. Shafiuzzaman Hira
Verilog operators
Verilog operators
Dr.YNM
Asset Monitoring with Beacons, Lora, NodeJS and IoT Cloud
Asset Monitoring with Beacons, Lora, NodeJS and IoT Cloud
Robert van Mölken
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Stavros Vassos
Hashing .pptx
Hashing .pptx
ParagAhir1
Transaction Processing Concept
Transaction Processing Concept
Nishant Munjal
Quantum_Safe_Crypto_Overview_v3.pdf
Quantum_Safe_Crypto_Overview_v3.pdf
RonSteinfeld1
Tendances
(20)
Stack Operation In Data Structure
Stack Operation In Data Structure
B trees
B trees
Unit 6
Unit 6
Two one Problem artificial intelligence
Two one Problem artificial intelligence
Skip lists (Advance Data structure)
Skip lists (Advance Data structure)
8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems
Combinational circuit
Combinational circuit
Distributed concurrency control
Distributed concurrency control
Cat database
Cat database
Digital Logic
Digital Logic
Rehashing
Rehashing
Cryptographic protocols
Cryptographic protocols
Transaction
Transaction
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
Verilog operators
Verilog operators
Asset Monitoring with Beacons, Lora, NodeJS and IoT Cloud
Asset Monitoring with Beacons, Lora, NodeJS and IoT Cloud
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Hashing .pptx
Hashing .pptx
Transaction Processing Concept
Transaction Processing Concept
Quantum_Safe_Crypto_Overview_v3.pdf
Quantum_Safe_Crypto_Overview_v3.pdf
Similaire à Fpga 09-behavioral-modeling-moore-machine
Digital System Design-Synchronous Sequential Circuits
Digital System Design-Synchronous Sequential Circuits
Indira Priyadarshini
Verilog_Examples (1).pdf
Verilog_Examples (1).pdf
DrViswanathKalannaga1
#include LPC17xx.h#include Lights.h#include traffic_fo.docx
#include LPC17xx.h#include Lights.h#include traffic_fo.docx
ajoy21
VERILOG CODE
VERILOG CODE
Dhaval Kaneria
07 seq logicii-ix2
07 seq logicii-ix2
SHIVA PRASAD
Embedded JavaScript
Embedded JavaScript
Jens Siebert
07 sequential verilog
07 sequential verilog
Hendrik Moch Yusro
VLSI Sequential Circuits II
VLSI Sequential Circuits II
Gouthaman V
ECE448_lecture7_ASM_VHDL.pptx
ECE448_lecture7_ASM_VHDL.pptx
AmenahAbbood
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
Maho Nakata
FPGA Tutorial - LCD Interface
FPGA Tutorial - LCD Interface
Politeknik Elektronika Negeri Surabaya
Digital System Design-Switchlevel and Behavioural Modeling
Digital System Design-Switchlevel and Behavioural Modeling
Indira Priyadarshini
Uart
Uart
cs1090211
Pythonによるカスタム可能な高位設計技術 (Design Solution Forum 2016@新横浜)
Pythonによるカスタム可能な高位設計技術 (Design Solution Forum 2016@新横浜)
Shinya Takamaeda-Y
PWM wave generator using microcontroller
PWM wave generator using microcontroller
Swapnil2515
Pwm wave
Pwm wave
Swapnil2515
13486500-FFT.ppt
13486500-FFT.ppt
Pratik Gohel
Direct analog
Direct analog
srikanthsailu
lecture23.pdf
lecture23.pdf
basitali274732
4 io port-programming
4 io port-programming
Channabasappa Kudarihal
Similaire à Fpga 09-behavioral-modeling-moore-machine
(20)
Digital System Design-Synchronous Sequential Circuits
Digital System Design-Synchronous Sequential Circuits
Verilog_Examples (1).pdf
Verilog_Examples (1).pdf
#include LPC17xx.h#include Lights.h#include traffic_fo.docx
#include LPC17xx.h#include Lights.h#include traffic_fo.docx
VERILOG CODE
VERILOG CODE
07 seq logicii-ix2
07 seq logicii-ix2
Embedded JavaScript
Embedded JavaScript
07 sequential verilog
07 sequential verilog
VLSI Sequential Circuits II
VLSI Sequential Circuits II
ECE448_lecture7_ASM_VHDL.pptx
ECE448_lecture7_ASM_VHDL.pptx
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
FPGA Tutorial - LCD Interface
FPGA Tutorial - LCD Interface
Digital System Design-Switchlevel and Behavioural Modeling
Digital System Design-Switchlevel and Behavioural Modeling
Uart
Uart
Pythonによるカスタム可能な高位設計技術 (Design Solution Forum 2016@新横浜)
Pythonによるカスタム可能な高位設計技術 (Design Solution Forum 2016@新横浜)
PWM wave generator using microcontroller
PWM wave generator using microcontroller
Pwm wave
Pwm wave
13486500-FFT.ppt
13486500-FFT.ppt
Direct analog
Direct analog
lecture23.pdf
lecture23.pdf
4 io port-programming
4 io port-programming
Plus de Malik Tauqir Hasan
Fpga 13-task-and-functions
Fpga 13-task-and-functions
Malik Tauqir Hasan
Fpga 12-event-control
Fpga 12-event-control
Malik Tauqir Hasan
Fpga 11-sequence-detector-fir-iir-filter
Fpga 11-sequence-detector-fir-iir-filter
Malik Tauqir Hasan
Fpga 10-bcd-to-excess-3-converter-manchester-encoding
Fpga 10-bcd-to-excess-3-converter-manchester-encoding
Malik Tauqir Hasan
Fpga 08-behavioral-modeling-mealy-machine
Fpga 08-behavioral-modeling-mealy-machine
Malik Tauqir Hasan
Fpga 07-port-rules-gate-delay-data-flow-carry-look-ahead-adder
Fpga 07-port-rules-gate-delay-data-flow-carry-look-ahead-adder
Malik Tauqir Hasan
Fpga 06-data-types-system-tasks-compiler-directives
Fpga 06-data-types-system-tasks-compiler-directives
Malik Tauqir Hasan
Fpga 05-verilog-programming
Fpga 05-verilog-programming
Malik Tauqir Hasan
Fpga 04-verilog-programming
Fpga 04-verilog-programming
Malik Tauqir Hasan
Fpga 03-cpld-and-fpga
Fpga 03-cpld-and-fpga
Malik Tauqir Hasan
Fpga 02-memory-and-pl ds
Fpga 02-memory-and-pl ds
Malik Tauqir Hasan
Fpga 01-digital-logic-design
Fpga 01-digital-logic-design
Malik Tauqir Hasan
Plus de Malik Tauqir Hasan
(12)
Fpga 13-task-and-functions
Fpga 13-task-and-functions
Fpga 12-event-control
Fpga 12-event-control
Fpga 11-sequence-detector-fir-iir-filter
Fpga 11-sequence-detector-fir-iir-filter
Fpga 10-bcd-to-excess-3-converter-manchester-encoding
Fpga 10-bcd-to-excess-3-converter-manchester-encoding
Fpga 08-behavioral-modeling-mealy-machine
Fpga 08-behavioral-modeling-mealy-machine
Fpga 07-port-rules-gate-delay-data-flow-carry-look-ahead-adder
Fpga 07-port-rules-gate-delay-data-flow-carry-look-ahead-adder
Fpga 06-data-types-system-tasks-compiler-directives
Fpga 06-data-types-system-tasks-compiler-directives
Fpga 05-verilog-programming
Fpga 05-verilog-programming
Fpga 04-verilog-programming
Fpga 04-verilog-programming
Fpga 03-cpld-and-fpga
Fpga 03-cpld-and-fpga
Fpga 02-memory-and-pl ds
Fpga 02-memory-and-pl ds
Fpga 01-digital-logic-design
Fpga 01-digital-logic-design
Dernier
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Pooja Nehwal
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
ur8mqw8e
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
soniya singh
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
roncy bisnoi
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
kojalkojal131
Russian Escorts in lucknow 💗 9719455033 💥 Lovely Lasses: Radiant Beauties Shi...
Russian Escorts in lucknow 💗 9719455033 💥 Lovely Lasses: Radiant Beauties Shi...
nagunakhan
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Pooja Nehwal
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
Suhani Kapoor
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Call Girls in Nagpur High Profile
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pooja Nehwal
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Call Girls in Nagpur High Profile
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
Pooja Nehwal
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
United Arab Emirates
presentation about microsoft power point
presentation about microsoft power point
chhavia330
Call Girls in Nagpur Sakshi Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Sakshi Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur High Profile
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
Pooja Nehwal
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
anilsa9823
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
ranjana rawat
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
ranjana rawat
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
ranjana rawat
Dernier
(20)
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Russian Escorts in lucknow 💗 9719455033 💥 Lovely Lasses: Radiant Beauties Shi...
Russian Escorts in lucknow 💗 9719455033 💥 Lovely Lasses: Radiant Beauties Shi...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
presentation about microsoft power point
presentation about microsoft power point
Call Girls in Nagpur Sakshi Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Sakshi Call 7001035870 Meet With Nagpur Escorts
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
Fpga 09-behavioral-modeling-moore-machine
1.
ENGR. RASHID FARID
CHISHTI LECTURER,DEE, FET, IIUI CHISHTI@IIU.EDU.PK WEEK 9 BEHAVIORAL MODELING MOORE MACHINE FPGA Based System Design Sunday, May 17, 2015 1 www.iiu.edu.pk
2.
www.iiu.edu.pk Sunday, May
17, 2015 Mealy Machine vs Moore Machine 2
3.
module Moore_mdl (x,AB,CLK,RST);
// Moore state diagram input x,CLK,RST; output [1:0]AB; reg [1:0] PrState, NxtState; parameter S0 = 2'b00, S1 = 2'b01, S2 = 2'b10, S3 = 2'b11; always @ (posedge CLK or negedge RST) // to handle reset and clock if (~RST) PrState = S0; // Initialize to state S0 else PrState = NxtState; // Clock operations always @ (PrState or x) // to Determine next state case (PrState) S0: if (~x) NxtState = S1; else NxtState = S0; S1: if (~x) NxtState = S3; else NxtState = S2; S2: if (~x) NxtState = S3; else NxtState = S2; S3: if (~x) NxtState = S0; else NxtState = S3; endcase assign AB = PrState; // to determine output endmodule www.iiu.edu.pk Sunday, May 17, 2015 Moore Model 3
4.
module test_Moore_Circuit; reg x,
CLK, RST; // inputs for circuit wire [1:0] AB; // output from circuit Moore_mdl mm1 (x, AB, CLK, RST); initial begin CLK = 0; repeat (14) #5 CLK = ~CLK; end initial begin x = 0; repeat (7) #10 x = ~ x; end initial begin RST = 1; #3 RST = 0; #3 RST = 1; end endmodule www.iiu.edu.pk Sunday, May 17, 2015 Test Bench 4
5.
www.iiu.edu.pk Sunday, May
17, 2015 Examples 5 Moore Machine
6.
// Structural description
of sequential circuit module Moore_mdl (x, y, AB, CLK, RST); input x, CLK, RST; output y; output [1:0] AB; wire Ta, Tb, A, B; assign Ta = x & AB[0], Tb = x; //Flip-flip input equations assign y = AB[1] & AB[0]; //Output equation T_FF BF (AB[0], Tb, CLK, RST); // Instantiate T flip-flops T_FF AF (AB[1], Ta, CLK, RST); endmodule module T_FF (Q,T,CLK,RST); // T flip-flop output Q; input T,CLK,RST; reg Q; always @ (posedge CLK or negedge RST) if (~RST) Q = 1'b0; else Q = Q ^ T; endmodule www.iiu.edu.pk Sunday, May 17, 2015 Structured Programming 6
7.
// Stimulus for
testing sequential circuit module test_Moore_mdl; reg x, CLK, RST; // inputs for circuit wire y; wire [1:0] AB; // output from circuit Moore_mdl mm1 (x, y, AB, CLK, RST); initial begin RST = 1; #7 RST = 0; #3 RST = 1; end initial begin CLK = 0; repeat (20) #5 CLK = ~CLK; end initial begin x = 1; repeat (10) #10 x = ~ x; end endmodule www.iiu.edu.pk Sunday, May 17, 2015 Test Bench 7
8.
module Moore_mdl (x,Y,
AB, CLK,RST); // Moore state diagram input x,CLK,RST; output [1:0]AB; output Y; reg [1:0] PrState, NxtState; parameter S0 = 2'b00, S1 = 2'b01, S2 = 2'b10, S3 = 2'b11; always @ (posedge CLK or negedge RST) // to handle reset and clock if (~RST) PrState = S0; // Initialize to state S0 else PrState = NxtState; // Clock operations always @ (PrState or x) // to Determine next state case (PrState) S0: if (x) NxtState = S1; else NxtState = S0; S1: if (x) NxtState = S2; else NxtState = S1; S2: if (x) NxtState = S3; else NxtState = S2; S3: if (x) NxtState = S0; else NxtState = S3; endcase assign AB = PrState; // to show state assign Y = AB[0] & AB[1]; // to show state endmodule www.iiu.edu.pk Sunday, May 17, 2015 Moore Machine: Behavioral Programming 8
Télécharger maintenant