2 * Simulator of microcontrollers (spdk.cc)
4 * Copyright (C) 2016 Drotos Daniel
6 * To contact author send email to dr.dkdb@gmail.com
10 /* This file is part of microcontroller simulator: ucsim.
12 UCSIM is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 UCSIM is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with UCSIM; see the file COPYING. If not, write to the Free
24 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
48 for (i
= 0; cpus_pdk
[i
].type_str
; i
++)
50 for (i
= 0; fppinfo
[i
].part
; i
++)
52 t
= (struct cpu_entry
*)malloc(sizeof(struct cpu_entry
) * (nr
+2));
54 for (i
= 0; cpus_pdk
[i
].type_str
; i
++)
56 t
[ti
].type_str
= cpus_pdk
[i
].type_str
;
57 t
[ti
].type
= cpus_pdk
[i
].type
;
58 t
[ti
].subtype
= cpus_pdk
[i
].subtype
;
59 t
[ti
].type_help
= cpus_pdk
[i
].type_help
;
60 t
[ti
].sub_help
= cpus_pdk
[i
].sub_help
;
63 for (i
= 0; fppinfo
[i
].part
; i
++)
66 if (fppinfo
[i
].part
[0] == 0) continue;
67 if (strcmp(fppinfo
[i
].arm_sym
, "84B") == 0) t
[ti
].type
= CPU_PDK13
;
68 if (strcmp(fppinfo
[i
].arm_sym
, "13" ) == 0) t
[ti
].type
= CPU_PDK13
;
69 if (strcmp(fppinfo
[i
].arm_sym
, "85A") == 0) t
[ti
].type
= CPU_PDK14
;
70 if (strcmp(fppinfo
[i
].arm_sym
, "14" ) == 0) t
[ti
].type
= CPU_PDK14
;
71 if (strcmp(fppinfo
[i
].arm_sym
, "86B") == 0) t
[ti
].type
= CPU_PDK15
;
72 if (strcmp(fppinfo
[i
].arm_sym
, "15" ) == 0) t
[ti
].type
= CPU_PDK15
;
73 if (strcmp(fppinfo
[i
].arm_sym
, "83A") == 0) t
[ti
].type
= CPU_PDK16
;
74 if (strcmp(fppinfo
[i
].arm_sym
, "16" ) == 0) t
[ti
].type
= CPU_PDK16
;
75 if (t
[ti
].type
!= CPU_NONE
)
77 t
[ti
].type_str
= fppinfo
[i
].part
;
81 case CPU_PDK13
: t
[ti
].type_help
= "PDK13"; break;
82 case CPU_PDK14
: t
[ti
].type_help
= "PDK14"; break;
83 case CPU_PDK15
: t
[ti
].type_help
= "PDK15"; break;
84 case CPU_PDK16
: t
[ti
].type_help
= "PDK16"; break;
85 default: t
[ti
].type_help
= ""; break;
94 t
[ti
].type_help
= NULL
;
101 main(int argc
, char *argv
[])
105 app_start_at
= dnow();
107 application
= new cl_app();
108 application
->set_name("spdk");
109 application
->init(argc
, argv
);
110 sim
= new cl_simpdk(application
);
112 sim
->state
|= SIM_QUIT
;
113 application
->set_simulator(sim
);
121 /* End of pdk.src/spdk.cc */