ログイン
ユーザ名:

パスワード:


パスワード紛失

新規登録
Main Menu
Tweet
Facebook
Line
:-?
フラット表示 前のトピック | 次のトピック
投稿者 スレッド
webadm
投稿日時: 2008-9-18 13:18
Webmaster
登録日: 2004-11-7
居住地:
投稿: 3088
RTLスケルトン入力
トップレベルのブロック分けが終了したのでRTL記述の段階に入る。

Signature Analyzerの時のようにQuartus IIでtemplateを使ってRTLスケルトンを入力してコンパイル。

top.v: topモジュール

module top(fin, ios1, ios2, xt1, xt2, a, b, hourset, s1, s2, s3, s4, dimmer, timeroutoff, blanking, ac, t1, t2, t3,
stopwatch, ambcout, pmfmout, sega, segb, segc, segd, sege, segf, segg, point, io, signalout, timerout, sleepout);

// Input Port(s)
input fin, ios1, ios2, xt1, a, b, hourset, s1, s2, s3, s4, dimmer, timeroutoff, blanking, ac, t1, t2, t3;

// Output Port(s)
output stopwatch, ambcout, pmfmout, sega, segb, segc, segd, sege, segf, segg, point, signalout, timerout, sleepout;
output [4:0] io;

// Inout Port(s)
output xt2;

// Parameter Declaration(s)

// Additional Module Item(s)
// A net models connectivity in a design.

// Scalar net
wire ce, reset, preset, load;
wire c3200hz, c800hz, c10hz, c1hz;
wire duty, strobe, timmadj, timhadj;
wire oncmpout, offcmpout, sleep;

// Unsigned vector
wire [19:0] fcounter;
wire [2:0] cs;
wire [16:0] clcounter, ontimer, offtimer, sleeptimer;

// Nets may be declared with many different types with different
// electrical characteristics:

// wire/tri Basic connection w/ typical electrical behavior

// supply1/supply0 Tied to VCC/GND

// tri1/tri0 Default to 1/0 if left undriven

// wor/trior Multiple drivers resolved by OR

// wand/triand Multiple drivers resolved by AND

// Basic module instantiation
fc fc(ac, fin, ce, reset, preset, load, fcounter);

cd cd(ac, xt1, xt2, c3200hz, c800hz, c10hz, c1hz);

control control(a, b, dimmer, ac, c800hz, c10hz,
ce, reset, preset, load, duty, strobe, timmadj, timhadj);

ct ct(ac, {s3,s2,s1}, timmadj, timhadj, c10hz, c1hz,
clcounter, ontimer, offtimer, sleeptimer, oncmpout, offcmpout, sleep);

disp disp(c3200hz, {s3,s2,s1}, fcounter, clcounter, ontimer, offtimer, sleeptimer,
oncmpout, offcmpout, sleep, duty, strobe, ac, blanking,
stopwatch, ambcout, pmfmout, sega, segb, segc, segd, sege, segf, segg, point,
io, signalout, timerout, sleepout);

endmodule


fc.v: FREQUENCY COUNTERモジュール

module fc(fin, ce, reset, preset, load, fcounter);

// Input Port(s)
input fin, ce, reset, preset, load;

// Output Port(s)
output reg [19:0] fcounter;

// Inout Port(s)

// Parameter Declaration(s)

// Additional Module Item(s)

endmodule

cd.v: CLOCK DIVIDERモジュール

module cd(xt1, xt2, c3200hz, c800hz, c10hz, c1hz);

// Input Port(s)
input xt1;

// Output Port(s)
output xt2, c3200hz, c800hz, c10hz, c1hz;

// Inout Port(s)

// Parameter Declaration(s)

// Additional Module Item(s)

endmodule

control.v: CONTROLモジュール

module control(a, b, hourset, s1, s2, s3, s4, dimmer, timeroutoff, blanking, ac, c800hz, c10hz,
ce, reset, preset, load, duty, strobe, blankingout, acout, cs, timmadj, timhadj);

// Input Port(s)
input a, b, hourset, s1, s2, s3, s4, dimmer, timeroutoff, blanking, ac, c800hz, c10hz;

// Output Port(s)
output ce, reset, preset, load, duty, strobe, blankingout, acout, timmadj, timhadj;
output [2:0] cs;

// Inout Port(s)

// Parameter Declaration(s)

// Additional Module Item(s)

endmodule

ct.v: CLOCK TIMERモジュール

module ct(ac, cs, timmadj, timhadj, c10hz, c1hz,
clcounter, ontimer, offtimer, sleeptimer, oncmpout, offcmpout, sleepout);

// Input Port(s)
input ac, timmadj, timhadj, c10hz, c1hz;
input [2:0] cs;

// Output Port(s)
output oncmpout, offcmpout, sleepout;
output [16:0] clcounter, ontimer, offtimer, sleeptimer;

// Inout Port(s)

// Parameter Declaration(s)

// Additional Module Item(s)

endmodule

disp.v: DISPLAYモジュール

module disp(c3200hz, cs, fcounter, clcounter, ontimer, offtimer, sleeptimer,
oncmpout, offcmpout, sleep, duty, strobe, ac, blanking,
stopwatch, ambcout, pmfmout, sega, segb, segc, segd, sege, segf, segg, point,
io, signalout, timerout, sleepout);

// Input Port(s)
input c3200hz, oncmpout, offcmpout, sleep, duty, strobe, ac, blanking;
input [2:0] cs;
input [19:0] fcounter;
input [16:0] clcounter, ontimer, offtimer, sleeptimer;

// Output Port(s)
output stopwatch, ambcout, pmfmout, sega, segb, segc, segd, sege, segf, segg, point, signalout, timerout, sleepout;
output [4:0] io;

// Inout Port(s)

// Parameter Declaration(s)

// Additional Module Item(s)

endmodule

ここまで入力している間にもっとインタフェース信号数を減らせることに気づく。それはまた後日検討しよう。

RTLスケルトンをコンパイルしてRTL Viewerでトップブロックを表示すると



もう出来た気分(´ー` )

あとは各ブロックの中身のRTLを記述すればよい。
フラット表示 前のトピック | 次のトピック

題名 投稿者 日時
   Poorman's MSM5524 webadm 2008-8-12 11:11
     トップレベル webadm 2008-8-13 5:51
     FREQUENCY COUNTERブロック webadm 2008-8-14 20:05
     CLOCK DIVIDERブロック webadm 2008-9-8 10:54
     CONTROLブロック webadm 2008-9-14 23:10
     CLOCK TIMERブロック webadm 2008-9-16 5:20
     DISPLAYブロック webadm 2008-9-17 10:16
   » RTLスケルトン入力 webadm 2008-9-18 13:18
     RTL: FREQUENCY COUNTER webadm 2008-9-18 22:49
     RTL: CLOCK DIVIDER webadm 2008-9-19 5:14
     RTL: CONTROL webadm 2008-9-19 8:56
     RTL: CLOCK TIMER webadm 2008-9-22 10:27
     RTL: DISPLAY webadm 2008-9-23 8:56
     動作シミュレーション webadm 2008-9-24 3:36
       Re: 動作シミュレーション webadm 2008-9-24 5:08
         周波数カウンターモードのシミュレーション webadm 2008-9-24 5:41
           QuartusのState Machine Viewer webadm 2008-9-24 6:18
             どうやらバグではないようだ webadm 2008-9-24 7:17
             周波数カウント動作は出来た webadm 2008-9-24 9:10
               時計とタイマー関連 webadm 2008-9-25 20:06
     VFDドライバ回路 webadm 2008-9-26 7:47
       Re: VFDドライバ回路 webadm 2008-10-1 10:08
         Re: VFDドライバ回路 webadm 2008-10-5 23:29
           Re: VFDドライバ回路 webadm 2008-10-6 11:09
             Re: VFDドライバ回路 webadm 2011-2-23 0:50
     XILINX ISEでコンパイルしてみた webadm 2008-9-29 11:07
     CLOCK TIMERモジュール無しでコンパイルしてみた webadm 2008-10-5 11:56
       Re: CLOCK TIMERモジュール無しでコンパイルしてみた webadm 2008-10-5 12:37
     冬休みの課題にしよう webadm 2008-12-16 9:49
       主要部品が届いた webadm 2008-12-24 20:21
         OKI MSM5524RS入手 webadm 2011-1-4 22:55
           Re: OKI MSM5524RS入手 webadm 2011-1-10 5:06

投稿するにはまず登録を
 
ページ変換(Google Translation)
サイト内検索