SlideServe
Menu
Préférences
© SlideServe · v2026

Component Design

bjorn avatar
7 diapositives · 257 Views · Sep 22, 2014

Component Design. By the end of the course each student will design and test a MIPS processor Datapath components will be designed and tested in the next few labs (registers, multiplexers, alu’s, etc.) Controller will be designed as a state machine

Component Design - slide 1
01 / 7Component Design
1 / 17

Télécharger la présentation

Component Design
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Component Design • By the end of the course each student will design and test a MIPS processor • Datapath components will be designed and tested in the next few labs (registers, multiplexers, alu’s, etc.) • Controller will be designed as a state machine • Controller and datapath will be combined and it will be used to run a machine program

  2. Reference Model Stimulus Generation Compare Design Design and Test Strategy • Each design will be tested by comparison to a reference model • Reference model should perform exactly as the real design • Both reference and design receive the same input

  3. Reference Model Reference model is behavioral, design is structural • A behavioral design is easier to create and easier to assume correct • Difficulties • A bug in either the reference model or the design will be detected • The reference model must be debugged before the design • The reference model may not be timing-accurate

  4. Reference Model Example module MUX_behav (f, sel, b, c); output reg f; input sel, a, b; always @ (sel or a or b) begin if (sel == 1) f = b; else f = a; end endmodule module MUX_struct (f, a, b, sel); output f; input a, b, sel; and #5 g1 (f1, a, nsel), g2 (f2, b, sel); or #5 g3 (f, f1, f2); not g4 (nsel, sel); endmodule Behavioral Reference Model Structural Design

  5. Testbench with Reference Model module mux_comp (mismatch, in1, in2, sel) input in1, in2, sel; output mismatch; wire out1, out2; MUX_behav m1 (out1, in1, in2, sel); MUX_struct m2 (out2, in1, in2, sel); xor x1 (mismatch, out1, out2); endmodule module mux_tb (mismatch) wire in1, in2, sel; output mismatch; mux_comp m1 (mismatch, in1, in2, sel); always … endmodule • Error is detected by observing the mismatch signal

  6. Reference Model for a Design with Timing module mult_struct (prod, in1, in2, clk) input [7:0] in1, in2; input clk; output [15:0] prod; // shift-add algorithm endmodule module mult_behav (prod, in1, in2) input [7:0] in1, in2; output [15:0] prod; res = in1 * in2; endmodule • Design is timing-accurate, reference model is not • Need to choose the sample points

  7. A Sample Clock module mult_tb wire in1, in2, clk, sclk; mult_comp m1 (in1, in2, clk, sclk); initial clk = 0; sclk = 0; always #5 sclk = ~sclk; always (sclk) #1 clk = ~clk; always … endmodule module mult_comp (in1, in2, clk, sclk) // declare inputs, outputs, wires mult_behav m1 (out1, in1, in2); mult_struct m2 (out2, in1, in2, clk); always (sclk) if (out1 != out2) $display(“error); endmodule • Signals must settle just before the clock • Sample clock rises just before regular clock