11import { join } from "path" ;
2- import { Language , RunOption } from "./decl" ;
2+ import { Language , RunOption , RunType } from "./decl" ;
33import { getConfig } from "../../Config" ;
44
55export class Verilog extends Language {
@@ -8,7 +8,7 @@ export class Verilog extends Language {
88 }
99
1010 get compiledFiles ( ) {
11- return [ join ( this . compileDir , "par.bit" ) ] ;
11+ return [ join ( this . runDir , "par.bit" ) ] ;
1212 }
1313
1414 compileOptionGenerator ( ) : RunOption {
@@ -26,18 +26,73 @@ export class Verilog extends Language {
2626 return 1000 ;
2727 }
2828
29+ srcFileName = "main.v" ;
30+
31+ [ RunType . Synthesis ] = {
32+ cacheable : true ,
33+ outputFiles : [ join ( this . runDir , "main.ngc" ) ] ,
34+ optionGenerator ( ) {
35+ return {
36+ skip : false ,
37+ command : getConfig ( ) . language . xst ,
38+ args : [ "-ifn" , "xc6slx9-2-ftg256.verilog.xst" ] ,
39+ } ;
40+ } ,
41+ } ;
42+
43+ [ RunType . Translate ] = {
44+ cacheable : true ,
45+ outputFiles : [ join ( this . runDir , "main.ngd" ) ] ,
46+ optionGenerator ( ) {
47+ return {
48+ skip : false ,
49+ command : getConfig ( ) . language . ngdbuild ,
50+ args : [ "-aul" , "-uc" , "ax309.ucf" , "main" ] ,
51+ } ;
52+ } ,
53+ } ;
54+
55+ [ RunType . Map ] = {
56+ cacheable : true ,
57+ outputFiles : [ join ( this . runDir , "main.ncd" ) ] ,
58+ optionGenerator ( ) {
59+ return {
60+ skip : false ,
61+ command : getConfig ( ) . language . map ,
62+ args : [ "main" ] ,
63+ } ;
64+ } ,
65+ } ;
66+
67+ [ RunType . Implement ] = {
68+ cacheable : true ,
69+ outputFiles : [ join ( this . runDir , "par.ncd" ) ] ,
70+ optionGenerator ( ) {
71+ return {
72+ skip : false ,
73+ command : getConfig ( ) . language . par ,
74+ args : [ "main" , "par" ] ,
75+ } ;
76+ } ,
77+ } ;
78+
79+ [ RunType . Generate ] = {
80+ cacheable : true ,
81+ outputFiles : [ join ( this . runDir , "par.bit" ) ] ,
82+ optionGenerator ( ) {
83+ return {
84+ skip : false ,
85+ command : getConfig ( ) . language . bitgen ,
86+ args : [ "par" ] ,
87+ } ;
88+ } ,
89+ } ;
90+
2991 pragramOptionGenerator ( ) : RunOption {
3092 return {
3193 skip : false ,
3294 command : getConfig ( ) . language . impact ,
3395 args : [ "-batch" , "main.cmd" ] ,
34- spawnOption : {
35- timeLimit : 10000 ,
36- } ,
3796 } ;
3897 }
39-
40- get srcFileName ( ) {
41- return "main.v" ;
42- }
4398}
0 commit comments