1 / 10

Γλώσσες Περιγραφής Υλικού

Γλώσσες Περιγραφής Υλικού. Γλώσσες Περιγραφής Υλικού. Οι γλώσσες περιγραφής υλικού είναι προσανατολισμένες στην περιγραφή της δομής του hardware και/ή της συμπεριφοράς του Χρησιμοποιούνται ευρέως από τη βιομηχανία Μπορούν να χρησιμοποιηθούν για προσομοίωση για σύνθεση

dugan
Download Presentation

Γλώσσες Περιγραφής Υλικού

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Γλώσσες Περιγραφής Υλικού

  2. Γλώσσες Περιγραφής Υλικού • Οι γλώσσες περιγραφής υλικού είναι προσανατολισμένες στην περιγραφή της δομής του hardware και/ή της συμπεριφοράς του • Χρησιμοποιούνται ευρέως από τη βιομηχανία • Μπορούν να χρησιμοποιηθούν • για προσομοίωση • για σύνθεση • Πρότυπες γλώσσες: VHDL, Verilog

  3. Περιγραφή υπομονάδων • Συντακτικό: 100 περίπου κωδικές λέξεις (input, output, wire, and, or, not κλπ) • // σχόλια • Κενά διαστήματα αγνοούνται – διάκριση πεζών, κεφαλαίων • Βασικό δομικό στοιχείο: υπομονάδα (module) • Δηλώνεται με module .. endmodule

  4. Verilog – περιγραφή δομής // Description of simple circuit module smpl_circuit(A, B, C, x, y); input A, B, C; output x, y; wire e; and g1(e, A, B); not g2(y, C); or g3(x, e, y); endmodule

  5. Verilog – καθυστέρηση διάδοσης πυλών Μια εντολήμεταγλωττιστή timescale ‘timescale 1ns / 100ps δηλώνει ότι μονάδα μέτρησης των καθυστερήσεων είναι το 1ns και η ακρίβεια κατά την στρογγυλοποίηση είναι 0.1 ns // Description of simple circuit module smpl_circuit(A, B, C, x, y); input A, B, C; output x, y; wire e; and #(30) g1(e, A, B); not #(10) g2(y, C); or #(20) g3(x, e, y); endmodule

  6. Verilog – stimulus // Stimulus module stimcircuit; reg A, B, C; wire x, y; smpl_circuit cwd(A,B,C,x,y); initial begin A=1’b0; B=1’b0; C=1’b0; #100 A=1’b1; B=1’b1; C=1’b1; #100 $finish; end endmodule

  7. Verilog – εφαρμογή δοκιμαστικής εισόδου • Μον.Χρόνου Είσοδος Έξοδος • (ns) A B C y e x • Αρχικά - 0 0 0 1 0 1 • 100 1 1 1 1 0 1 • 110 1 1 1 0 0 1 • 120 1 1 1 0 0 1 • 130 1 1 1 0 1 0 • 140 1 1 1 0 1 0 • 150 1 1 1 0 1 1

  8. Μοντελοποίηση σε επίπεδο πυλών // Gate-level description 2-4-line decoder module decoder_g1(A, B, E, D); input A, B, E; output [0:3]D; //διάνυσμα 4 bit wire Anot,Bnot,Enot; //εσωτερικοί κόμβοι not n1 (Anot, A), n2 (Bnot, B), n3 (Enot, E); nand n4 (D[0], Anot, Bnot, Enot), n5 (D[1], Anot, B, Enot), n6 (D[2], A, Bnot, Enot), n7 (D[3], A, B, Enot); endmodule

  9. Μοντελοποίηση Ροής Δεδομένων // Dataflow description 2-4-line decoder module decoder_df(A, B, E, D); input A, B, E; output [0:3]D; //διάνυσμα 4 bit assign D[0] = ~(~A & ~B & ~E), D[1] = ~(~A & B & ~E), D[2] = ~(A & ~B & ~E), D[3] = ~(A & B & ~E), endmodule

  10. Μοντελοποίηση Συμπεριφοράς // Dataflow description 4-1 line MUX module mux(i0, i1, i2, i3, select, y); input i0, i1, i2, i3; input [1:0] select; output y; reg y; //η έξοδος των εντολών πρέπει //να είναι τύπου reg always @ (i0 or i1 or i2 or i3 or select) case (select) 2'b00 : y = i0; 2'b01 : y = i1; 2'b10 : y = i2; 2'b11 : y = i3; endcase endmodule • στον τύπο wire η έξοδος μιας ανάθεσης ανανεώνεται συνεχώς • στον τύπο reg η τιμή διατηρείται μέχρις ότου ανατεθεί νέα τιμή • - οι διαδικασιακές εντολές εκτελούνται κάθε φορά που αλλάζει τιμή κάποια από τις μεταβλητές που αναφέρονται μετά το @

More Related