åé¡ã®å®åŒå
ããªãã¯ãªãã£ã¹çšã®ãœããããªã³ã¯ãã·ã³ãèšèšããããã«èª¬åŸãããŸãããããªã³ã¯ã¯çµåã«ãã£ãŠéšåçã«ã«ããŒãããŠããã®ã§ã5ã«ãŒãã«ããããããŸããããã·ã³ã¯ã1ã2ã5ã«ãŒãã«ã®ç¡¬è²šãåãå ¥ããŸãã顧客ãå¿ èŠãªéé¡ãæ¯æããšããã«ããã·ã³ã飲ã¿ç©ãåé ããé£éãè¿ããŸããæž æ¶Œé£²æã®èªå販売æ©ã®ã¹ããŒããã·ã³ãèšèšããŸãããã·ã³ã®å ¥åã¯ã1ã2ãããã³5ã«ãŒãã«ã§ããã€ãŸãããããã®ã³ã€ã³ã®ã©ããæ¿å ¥ãããŸãã
ã¯ããã¯ããšã«1ã€ã®ã³ã€ã³ã®ã¿ãæ¿å ¥ããããšä»®å®ããŸãããã·ã³ã«ã¯åºåããããŸãïŒãœãŒãã泚ãã1ã«ãŒãã«ãè¿ãã2ã«ãŒãã«ãè¿ãã2ã«ãŒãã«ã®å Žåã¯2ãè¿ããŸããèªå販売æ©ã§5ã«ãŒãã«ïŒãŸãã¯ãã以äžïŒãåéããããšããã«ãä¿¡å· "FILL GASING"ãšã察å¿ããå€æŽãè¿ãããã®ä¿¡å·ãèšå®ãããŸãããã®åŸããã·ã³ã¯åã³ã³ã€ã³ãåãå ¥ããæºåãã§ããŠããã¯ãã§ãã
çè«
æéç¶æ æ©æ¢°ãŸãã¯æéç¶æ æ©æ¢°ïŒFSMïŒã¯ã倧éšåã®ããžã¿ã«åè·¯ãè¡šãåæã·ãŒã±ã³ã·ã£ã«åè·¯ã®ã¯ã©ã¹ã«å±ããŸããããã¯ããããžã§ã¯ããå®è£ ããæ¹æ³ã§ãïŒå°ãªããšãæåã¯ïŒããã®æ¹æ³ã¯ãåè·¯ã®åçŸæ§ãšæ€èšŒãæäŸããããŸããŸãªåè·¯èŠçŽ ã®é 延æ¯ã«äŸåããŸãããåæã·ãŒã±ã³ã·ã£ã«åè·¯ãæ§ç¯ããããã®èŠåã§ã¯ãåè·¯ã®èŠçŽ ã次ã®æ¡ä»¶ãæºããå Žåãåè·¯ã¯åæã·ãŒã±ã³ã·ã£ã«åè·¯ã§ãããšèŠå®ãããŠããŸãã
- ååè·¯èŠçŽ ã¯ãã¬ãžã¹ã¿ãŸãã¯çµã¿åããåè·¯ã§ãã
- å°ãªããšã1ã€ã®ã¹ããŒãèŠçŽ ãã¬ãžã¹ã¿ãŒã§ãã
- ãã¹ãŠã®ã¬ãžã¹ã¿ã¯ãåäžã®ã¯ããã¯ä¿¡å·ã§ã¯ããã¯ãããŸãã
- å埪ç°ãã¹ã«ã¯ãå°ãªããšã1ã€ã®ã¬ãžã¹ã¿ãå«ãŸããŸãã
ç¶æ æ©æ¢°ã«ã¯ããã€ãã®ç¶æ ãããããããã¯ã¬ãžã¹ã¿ãŒã«ä¿ç®¡ãããŸããã¯ããã¯ä¿¡å·ãå°çãããšãã¹ããŒããã·ã³ã¯ãã®ç¶æ ãå€æŽã§ããŸããç¶æ ãã©ã®çšåºŠæ£ç¢ºã«å€åãããã¯ãå ¥åä¿¡å·ãšçŸåšã®ç¶æ ã«ãã£ãŠç°ãªããŸããæãåçŽãªã±ãŒã¹ã§ã¯ãå ¥åä¿¡å·ããŸã£ãããªãå Žåããããããååšåšãæ©èœããŸããæéç¶æ æ©æ¢°ã«ã¯äž»ã«2ã€ã®ã¯ã©ã¹ããããŸããåºåä¿¡å·ããªãŒãããã³ã®çŸåšã®ç¶æ ã®ã¿ã«äŸåããã ãŒã¢ãªãŒãããã³ãšãåºåä¿¡å·ãçŸåšã®ç¶æ ãšå ¥åä¿¡å·ã«äŸåããããŒãªãŒãªãŒãããã³ã§ããååãšããŠãä»»æã®æéç¶æ æ©æ¢°ã¯ãã ãŒã¢ã¹ããŒã ãšãã€ãªãŒã¹ããŒã ã®äž¡æ¹ã«åŸã£ãŠå®è£ ã§ããŸããäž¡è ã®éãã¯ãã ãŒã¢ãªãŒãããã³ãããå€ãã®ç¶æ ãæã¡ãMilyãªãŒãããã³ã®1ã¯ããã¯é ããããšã§ãããœãŒããã·ã³åè·¯ã«ã¯ããã€ã«åè·¯ã䜿çšããŸããç¶æ æ©æ¢°ãè¿°ã¹ãŸãããïŒ
ã·ã³ãã« | 説æ |
---|---|
S 0 | åæç¶æ ã¯ã0ã«ãŒãã«ã®çŽ¯ç©é¡ã |
S 1 | 1åã®æ©æŠã®çŽ¯ç©éã |
S 2 | 2ã«ãŒãã«ãèç©ããã |
S 3 | 3ã«ãŒãã«ãèç©ããã |
S 4 | 4ã«ãŒãã«ãèç©ããã |
å ¥åä¿¡å·ã¯2ããããã¹ã§ãã³ã€ã³ã®éçš®ã¯æ¬¡ã®ããã«ã³ãŒãã£ã³ã°ãããŠããŸãã
ã·ã³ãã« | å€ | 説æ |
---|---|---|
ç§1 | 01 | 1 RUB |
ç§2 | å | RUB 2 |
ç§5 | åäž | RUB 5 |
ãªãŒãããã³ã®ç¶æ å³ãæç»ããŸãïŒMilyãªãŒãããã³ã®ç¶æ å³ã§ã¯ãç¶æ é·ç§»ã®ç¢å°ã«åºåä¿¡å·ã瀺ãå¿ èŠããããŸããå³ãä¹±éã«ãªããªãããã«ãããè¡ããªãã§ãã ããããã¹ãŠã®åºåä¿¡å·ã¯äžã®è¡šã«æãããŸãïŒïŒ
ç¶æ ãšåºåä¿¡å·ã®å€åã®è¡šãæžã蟌ã¿ãŸãïŒ
å· | å ¥åä¿¡å· | |||||
---|---|---|---|---|---|---|
S | S' | insert | pour_water | C 1 . change1 | 2 . change2 | 2 2 . change22 |
S0 | S1 | I1 | 0 | 0 | 0 | 0 |
S0 | S2 | I2 | 0 | 0 | 0 | 0 |
S0 | S0 | I5 | 1 | 0 | 0 | 0 |
S1 | S2 | I1 | 0 | 0 | 0 | 0 |
S1 | S3 | I2 | 0 | 0 | 0 | 0 |
S1 | S0 | I5 | 1 | 1 | 0 | 0 |
S2 | S3 | I1 | 0 | 0 | 0 | 0 |
S2 | S4 | I2 | 0 | 0 | 0 | 0 |
S2 | S0 | I5 | 1 | 0 | 1 | 0 |
S3 | S4 | I1 | 0 | 0 | 0 | 0 |
S3 | S0 | I2 | 1 | 0 | 0 | 0 |
S3 | S0 | I5 | 1 | 1 | 1 | 0 |
S4 | S0 | I1 | 1 | 0 | 0 | 0 |
S4 | S0 | I2 | 1 | 1 | 0 | 0 |
S4 | S0 | I5 | 1 | 0 | 0 | 1 |
Quartus Prime
Quartusã«ã¯ç¡æã®Liteãšãã£ã·ã§ã³ãããããããã§ãã·ã§ãã«ãšãã£ã·ã§ã³ãšæ¯èŒããŠããã€ãã®å¶éããããŸããäž»ãªå¶éã¯ããããžã§ã¯ãã·ãã¥ã¬ãŒã·ã§ã³ã®ãœãŒã¹ã³ãŒãã10,000è¡ãè¶ ããªãããšã§ããç»é²åŸããªã³ã¯ããããŠã³ããŒãã§ããŸãããã®èšäºã®å·çæç¹ã§ã®ææ°ããŒãžã§ã³ã¯19.1ã§ããããã®ããŒãžã§ã³ã§ã®äœæ¥ã«åºã¥ããŠãèšäºãæžããŸããã Lite EditionãããŒãžã§ã³19.1ãWindowsãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãéžæããŸãïŒLinuxã«ã¯QuartusããŒãžã§ã³ããããæ£åžžã«åäœããŸãã32ãããã§ãå€ãããŒãžã§ã³ã®ãã©ã³ããããã³ã°ã©ã€ãã©ãªã䜿çšããModelSimã§åé¡ãçºçãããããæåã«WindowsããŒãžã§ã³ã䜿çšããããšããå§ãããŸãã ïŒã[çµåãã¡ã€ã«]ã¿ããéžæããŸããããŠã³ããŒãçšã®ã¢ãŒã«ã€ãã®ãµã€ãºã¯éåžžã«å€§ããã§ã-5.6 GbããããèŠããŠãããŠãã ãããããŠã³ããŒãããã¢ãŒã«ã€ããå±éããŠå®è¡ããŸãsetup.batãã€ã³ã¹ããŒã«ã¯æšæºçãªæ¹æ³ã§è¡ãããã³ã³ããŒãã³ãã®ããã©ã«ãã®éžæã䜿çšããŸãã
ãããžã§ã¯ãã®äœæ
æ°ãããããžã§ã¯ããäœæããã«ã¯ã[ ãã¡ã€ã«]â[ãããžã§ã¯ããŠã£ã¶ãŒãã«ããæ°èŠäœæ...]ãéžæããŸããæåã®ãŠã£ã¶ãŒããŠã£ã³ããŠã¯æ å ±ãæäŸãããã®ã§ããã次ãžãã¯ãªãã¯ãã2çªç®ã®ãŠã£ã³ããŠã§ããããžã§ã¯ããé 眮ããå Žæããã®ååãsoda_machineããããã³ãããã¬ãã«ã®èšèšèŠçŽ ãsoda_machineããå³ã®ããã«
éžæããŸãã次ã®ãŠã£ã³ããŠã§ã空ã®ãããžã§ã¯ãããéžæããŸãããã¡ã€ã«ãè¿œå ãããŠã£ã³ããŠããã¡ã€ã«ãè¿œå ããäœãè¿œå ããŸãããããã¡ããªãããã€ã¹ãããŒãèšå®ãã®ããã€ã¹éžæãŠã£ã³ããŠã¯å®éã®ãããžã§ã¯ãã«ãšã£ãŠéåžžã«éèŠã§ãããç§ãã¡ã®ãããžã§ã¯ãã¯æè²çã§ãããå®éã®ãããžã§ã¯ããšã¯ããé¢ããŠãã
ãããå³ã®ããã«ããã§ã¯ããã©ã«ãèšå®ã®ãŸãŸã«ããŸããä»ã®ããŒã«ã®èšå®ãéžæããããã®ãŠã£ã³ããŠãEDAããŒã«ã®èšå®ãã䜿çšãããããžã§ã¯ããã·ãã¥ã¬ãŒãããããšãéžæãããModelSimã®ã¢ã«ãã©ã®ããšãã·ã¹ãã ã®Verilog HDLã圢åŒãçµµã®ããã«ïŒ
æåŸã®æ å ±ãŠã£ã³ããŠãæŠèŠããã¯ãªãã¯ããå®äºãã
ãœãŒã¹ã³ãŒããæžã
ãœãŒã¹ã³ãŒããå«ã2ã€ã®ã¡ã€ã³ãã¡ã€ã«ããããŸããããã¯soda_machineã¢ãžã¥ãŒã«èªäœãšãã®ãã¹ããã³ãã§ãããããã®ãã¡ã€ã«ã¯ã©ã¡ããã硬貚ã®çš®é¡ããšã³ã³ãŒãããæ¹æ³ãèšè¿°ããinsert_typeããŒã¿åã䜿çšãããããå¥ã®ãã¡ã€ã«ã«åé¢ããããšã¯è«ççã§ãããã ããQuartusããã³ModelSimã®ã³ã³ãã€ã«æ©èœã«é¢é£ããããã€ãã®åé¡ããããŸãã Quartusã¯ãã¹ãŠã®ãœãŒã¹ãã¡ã€ã«ã1åã®ãã¹ã§ã³ã³ãã€ã«ããModelSimã¯åãã¡ã€ã«ãåå¥ã«ã³ã³ãã€ã«ãããããQuartusãã³ã³ãã€ã«ãããšãã«insert_typeåã®åå®çŸ©ããªãããããã¯ãããã»ããµãã£ã¬ã¯ãã£ãã«åºã¥ããŠC / C ++ã€ã³ã¯ã«ãŒãã¬ãŒãã®ææ³ã䜿çšããŸããããŸããModelSimã®ããã«ããšã確èªããããã«insert_typeãã§äœ¿çšsoda_machineã®ã¢ãžã¥ãŒã«ãããŠããã¹ããã³ãã§ã¯ãåãããã«ããã®èª¬æãsoda_machine_typesããã±ãŒãžå ã«é 眮ããŸãããããã®èŠä»¶ãèæ ®ãããšãsoda_machine_types.svãã¡ã€ã«ã¯æ¬¡ã®ããã«ãªããŸãã
soda_machine_types.sv
`ifndef soda_machine_types_sv_quard
package soda_machine_types;
typedef enum logic [1:0] {I1=2'b01, I2=2'b10, I5=2'b11} insert_type;
endpackage
`define soda_machine_types_sv_quard
`endif
ããã§ãsoda_machineã¢ãžã¥ãŒã«èªäœãsoda_machine.svãã¡ã€ã«ã«é 眮ãããŸãã
soda_machine.sv
`include "soda_machine_types.sv"
import soda_machine_types::*;
module soda_machine(
input logic clk, // Clock
input logic reset, // Active high level
input insert_type insert,
output logic pour_water,
output logic change1,
output logic change2,
output logic change22);
typedef enum logic [2:0] {S0, S1, S2, S3, S4} state_type;
(* syn_encoding = "default" *) state_type state, nextstate;
//
always_ff @(posedge clk, posedge reset)
if (reset)
state <= S0;
else
state <= nextstate;
//
always_comb
case (state)
S0:
case (insert)
I1:
nextstate = S1;
I2:
nextstate = S2;
I5:
nextstate = S0;
endcase
S1:
case (insert)
I1:
nextstate = S2;
I2:
nextstate = S3;
I5:
nextstate = S0;
endcase
S2:
case (insert)
I1:
nextstate = S3;
I2:
nextstate = S4;
I5:
nextstate = S0;
endcase
S3:
if (insert == I1)
nextstate = S4;
else
nextstate = S0;
S4:
nextstate = S0;
endcase
//
assign pour_water = (state == S4) | (insert == I5) | (state == S3) & (insert == I2);
assign change1 = (state == S1) & (insert == I5) | (state == S3) & (insert == I5) | (state == S4) & (insert == I2);
assign change2 = (state == S2) & (insert == I5) | (state == S3) & (insert == I5);
assign change22 = (state == S4) & (insert == I5);
endmodule
ã¹ããŒããã·ã³ã®ç¶æ ãã©ã®ããã«ãšã³ã³ãŒãããããã¯ãQuartusã«ä»»ããŸããããšã³ã³ãŒãã£ã³ã°ã®æ¹æ³ã瀺ãããã«ãå±æ§ïŒ* syn_encoding = "default" *ïŒã䜿çšãããŸããä»ã®ãšã³ã³ãŒãã£ã³ã°ãªãã·ã§ã³ã¯ãããã§ç¢ºèªã§ããŸãã
å®éã®ãããžã§ã¯ãã§ã¯ãMilesãã·ã³ã®çµã¿åããããžãã¯ã®åºåä¿¡å·ãã¬ãžã¹ã¿ãŒã«æ ŒçŽããã¬ãžã¹ã¿ãŒã®åºåããFPGAåºåã«äŸçµŠããå¿ èŠãããããšã«æ³šæããŠãã ãããã¡ã¿ã¹ããŒãã«ç¶æ ã«é¥ããªãããã«ããã«ã¯ãã·ã³ã¯ããã€ã¶ãŒã䜿çšããŠå ¥åä¿¡å·ãã¯ããã¯åšæ³¢æ°ãšåæãããå¿ èŠããããŸãã
ãããžã§ã¯ãã«ãã¡ã€ã«ãè¿œå ããã«ã¯ããã¡ã€ã«->æ°ãããSystemVerilog HDLãã¡ã€ã«ãã䜿çšããŸããä¿åæã«é©åãªååãä»ããŸãããããã®2ã€ã®ãã¡ã€ã«ãè¿œå ããåŸãåŠç->ã³ã³ãã€ã«ã®éå§ã§ãããžã§ã¯ããã³ã³ãã€ã«ã§ããŸããã³ã³ãã€ã«ãæåãããšãçµæã®ã¹ããŒãããŒã«->ããããªã¹ããã¥ãŒã¢-> RTLãã¥ãŒã¢ã衚瀺ãããŸãã
RTLãã¥ãŒã¢
ã¹ããŒããã·ã³ã®ç¶æ å³ã衚瀺ããã«ã¯ããŒã«->ããããªã¹ããã¥ãŒã¢->ã¹ããŒããã·ã³ãã¥ãŒã¢
ã¹ããŒããã·ã³ãã¥ãŒã¢
Encodingã¿ãã§ãQuartusããã¯ã³ãããããšã³ã³ãŒãã£ã³ã°ã¹ããŒã ãé©çšããããšãããããŸããããã¯ãåç¶æ ã«åå¥ã®Dããªã¬ãŒã䜿çšãããç¶æ S 0ã0ã§ã¯ãªã0ã«ãšã³ã³ãŒããããŠããå Žåã§ããããã¯ãåæãªã»ããã¹ããŒã ãç°¡ç¥åããããã«è¡ãããŸããç¶æ ãRTL Viewerãåè·¯å³ãæ£ç¢ºã«è¡šç€ºããã®ã§ã¯ãªããæŠå¿µã瀺ããŠããããšã«æ°ä»ãã§ããããåè·¯å³ã衚瀺ããã«ã¯ãããŒã«->ããããªã¹ããã¥ãŒã¢->ãã¯ãããžããããã¥ãŒã¢ïŒãã£ããã£ã³ã°åŸïŒã䜿çšããŸãã
ã·ãã¥ã¬ãŒã·ã§ã³
ååãšããŠãçŸæç¹ã§ã¯ãœãŒãæ°Žã販売ãããã·ã³ã®åè·¯ããããŸãããæ£ããæ©èœããããšã確èªããå¿ èŠããããŸãããã®ããããã¹ããã³ããäœæããŠsoda_machine_tb.svãã¡ã€ã«ã«é 眮ããŸãã
soda_machine_tb.sv
`include "soda_machine_types.sv"
import soda_machine_types::*;
module soda_machine_tb;
insert_type insert;
logic [5:0] testvectors[10000:0];
int vectornum, errors;
logic clk, reset, pour_water, change1, change2, change22;
logic pour_water_expected, change1_expected, change2_expected, change22_expected;
//
soda_machine dut(
.clk(clk),
.reset(reset),
.insert(insert),
.pour_water(pour_water),
.change1(change1),
.change2(change2),
.change22(change22)
);
//
always
#5 clk = ~clk;
//
initial begin
//
$readmemb("../../soda_machine.tv", testvectors);
vectornum = 0;
errors = 0;
clk = 1;
//
reset = 1; #13; reset = 0;
end
//
always @(posedge clk) begin
#1; {insert, pour_water_expected, change1_expected, change2_expected, change22_expected} = testvectors[vectornum];
end
// ,
always @(negedge clk)
if (~reset) begin
if ((pour_water !== pour_water_expected) || (change1 !== change1_expected) || (change2 !== change2_expected) ||
(change22 !== change22_expected)) begin
$error("%3d test insert=%b\noutputs pour_water=%b (%b expected), change1=%b (%b expected), change2=%b (%b expected), change22=%b (%b expected)",
vectornum + 1, insert, pour_water, pour_water_expected, change1, change1_expected, change2, change2_expected, change22, change22_expected);
errors = errors + 1;
end
vectornum = vectornum + 1;
if (testvectors[vectornum] === 6'bx) begin
$display("Result: %3d tests completed with %3d errors", vectornum, errors);
$stop;
end
end
endmodule
ã¢ãžã¥ãŒã«ããã¹ãããã«ã¯ããã¹ããã¯ã¿ãŒãã¡ã€ã«soda_machine.tvã䜿çšããŸãã
soda_machine.tv
01_0_0_0_0
01_0_0_0_0
01_0_0_0_0
01_0_0_0_0
01_1_0_0_0
10_0_0_0_0
10_0_0_0_0
10_1_1_0_0
11_1_0_0_0
10_0_0_0_0
10_0_0_0_0
11_1_0_0_1
10_0_0_0_0
11_1_0_1_0
01_0_0_0_0
01_0_0_0_0
01_0_0_0_0
11_1_1_1_0
æåã®2ãããã¯æ¿å ¥å ¥åã次ã®4ãããã¯åºåã«å¯ŸããæåŸ ã§ãïŒpour_waterãchange1ãchange2ãchange22ãããšãã°ããã¡ã€ã«ã®å é ã§ãã«ãŒãã«ã³ã€ã³ã5åç¶ããŠæ¿å ¥ãããŸãã5çªç®ã®ã³ã€ã³ã§ã¯ãpour_waterä¿¡å·ã衚瀺ãããããšãæåŸ ããŠããŸãããå€æŽé éä¿¡å·ã¯éã¢ã¯ãã£ãã§ããsoda_machine.tvã®ãã¡ã€ã«ãããã«è¿œå ãã¡ã€ã«- >æ°èŠãããã¹ããã¡ã€ã«ããããžã§ã¯ãã
ã®ModelSimã§ã®äœæ¥ã®éœåäžãè¿œå soda_machine_run_simulation.doã®ãã¡ã€ã«ãããŠã以äžã®å 容ïŒ
soda_machine_run_simulation.do
add wave /soda_machine_tb/dut/clk
add wave /soda_machine_tb/dut/reset
add wave /soda_machine_tb/dut/insert
add wave /soda_machine_tb/dut/state
add wave /soda_machine_tb/dut/nextstate
add wave /soda_machine_tb/dut/pour_water
add wave /soda_machine_tb/dut/change1
add wave /soda_machine_tb/dut/change2
add wave /soda_machine_tb/dut/change22
view structure
view signals
run -all
wave zoom full
ã·ãã¥ã¬ãŒã·ã§ã³ãå®è¡ããä¿¡å·ãããããModelSimã«åºåããŸããsoda_machine_run_simulation.doãã¡ã€ã«ããããžã§ã¯ããã¡ã€ã«ã«è¿œå ãããŸã->æ°ãããTclã¹ã¯ãªãããã¡ã€ã«ã
次ã«ãã·ãã¥ã¬ãŒã·ã§ã³ãèªåçã«éå§ãããããã«ãããžã§ã¯ããèšå®ããŸããã¡ãã¥ãŒé ç®[ å²ãåœãŠ]-> [èšå®]ãéžæããã«ããŽãª[EDAããŒã«èšå®]-> [ã·ãã¥ã¬ãŒã·ã§ã³]ãéžæããŸããNativeLinkã®èšå®ãéžæã³ã³ãã€ã«ãã¹ããã³ããïŒãã¯ãªãã¯ããŠãã¹ããã³ãã®ãã¿ã³ã...ã§ãã¹ããã³ãã®ãŠã£ã³ããŠãéããã¯ãªãã¯ããŠãã ããæ°ãããã¿ã³ã...ã§æ°ãããã¹ããã³ãã®èšå®ãéãããŠã£ã³ããŠã§å¡ãã€ã¶ãããã¹ããã³ãåã®ãã£ãŒã«ãïŒsoda_machine_tbããŠã£ã³ããŠã®äžéšã«ãããã¡ã€ã«éžæãã¿ã³...ãã¯ãªãã¯ããsoda_machine_tb.svãã¡ã€ã«ãéžæããŠã[ è¿œå ]ãã¿ã³ãã¯ãªãã¯ããŸããå³ã®ããã«è¡šç€ºãããŸãã[æ°ãããã¹ããã³ãèšå®]
ãŠã£ã³ããŠã§ã[ OK ]ãã¯ãªãã¯ããŸãã [ ãã¹ããã³ã]ãŠã£ã³ããŠã¯æ¬¡ã®ãã ã«ãªããŸãã[ ãã¹ããã³ã ] ãŠã£ã³ããŠã§ã[ OK ]ãã¯ãªãã¯ããŸããNativeLinkã®èšå®ã確èªããã·ãã¥ã¬ãŒã·ã§ã³èšå®ããããã«äœ¿çšããã¹ã¯ãªããããã§ãã¯ããã¯ã¹ãéžæãsoda_machine_run_simulation.doã®ãã¡ã€ã«ãã [ èšå®]ãŠã£ã³ã㊠ã¯æ¬¡ã®ããã«ãªã ãŸãã[ èšå®]ãŠã£ã³ããŠã§ã
OKãæã ã¯ãããžã§ã¯ãã®ã³ã³ãã€ã«åŠçã- >ã¹ã¿ãŒãã³ã³ãã€ã«ã¯ãæã ã¯ã·ãã¥ã¬ãŒã·ã§ã³éå§ããŒã«] - > [ãã¡ã€ã«åãæå®ããŠå®è¡ã·ãã¥ã¬ãŒã·ã§ã³ããŒã«- > RTLã·ãã¥ã¬ãŒã·ã§ã³ãModelSimããããžã§ã¯ããèµ·åããŠã·ãã¥ã¬ãŒã·ã§ã³ããã¯ãã§ããæåèµ·ããã¿ãã®å€èŠ³ïŒ
ModelSimãã©ã³ã¹ã¯ãªããã¿ã
å®è¡ããããã¹ãã®æ°ãšæ€åºããããšã©ãŒã«é¢ãããã¹ããã³ãã®åºåã¯ãèµ€ã§åŒ·èª¿è¡šç€ºãããŠããŸãã[æ³¢]ã¿ãã®å€èŠ³ïŒ
ModelSim Waveã¿ã
ãããžã§ã¯ãã®ãœãŒã¹ã³ãŒã
ãããžã§ã¯ãã®ãœãŒã¹ã³ãŒãã§ããgithub.com/igoral5/soda_machineã¯ããŒã³ãããžã§ã¯ãããã®åŸã®Quartusã®ã§ãããžã§ã¯ããéããã¡ã€ã«- >ãããžã§ã¯ããéã...
éžæsoda_machine.qpfãã¡ã€ã«ãã次ã«ããããžã§ã¯ããã³ã³ãã€ã«ããŸããåŠç->ã³ã³ãã€ã«ã®éå§ãšã·ãã¥ã¬ãŒã·ã§ã³ããŒã«->ã·ãã¥ã¬ãŒã·ã§ã³ããŒã«ã®å®è¡-> RTLã·ãã¥ã¬ãŒã·ã§ã³ãéå§ããŸãã