Overview
Comment: | `mtt sys sfun zip` now produces an input block and an interface block for MTT models. Models can be embedded within larger Simulink models by the 2 ports. The user must edit 2 code blocks in <sys>_sfun_interface.c before compiling with mex. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0ae1960649dadca384b98147a5c5625d |
User & Date: | geraint@users.sourceforge.net on 2002-05-23 17:08:21 |
Other Links: | branch diff | manifest | tags |
Context
2002-05-23
| ||
17:26:07 | Cosmetic tweaks to graphs check-in: 4d5e314d90 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
17:08:21 |
`mtt sys sfun zip` now produces an input block and an interface block for MTT models. Models can be embedded within larger Simulink models by the 2 ports. The user must edit 2 code blocks in <sys>_sfun_interface.c before compiling with mex. check-in: 0ae1960649 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
2002-05-22
| ||
16:59:59 | Multiple ps files generated - view shows all check-in: 8d0ad4c90b user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/mtt from [f52b61c98a] to [559d19bde1].
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + + + + | # Copyright (C) 2001 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ ## Revision 1.350 2002/05/21 08:45:36 gawthrop ## DIY reps: no longer skips rep if file exists already. ## Avoids problems in rep.txt when options change ## ## Revision 1.349 2002/05/20 10:29:59 gawthrop ## -oct now forces an m target language to be oct ## (if the rep is an the list: "ae input logic numpar simpar state") ## ## Revision 1.348 2002/05/20 08:50:12 geraint ## Cleans _sfun_ae.mexglx. ## |
︙ | |||
1654 1655 1656 1657 1658 1659 1660 | 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 | - + | rm -f *_*_write.r *_simpar.m *_simpar.p rm -f *_cseo.oct *_input.oct *_simpar.oct *_smxax.oct rm -f *_csex.oct *_numpar.oct *_smxa.oct *_state.oct rm -f *_ode.oct *_odeo.oct rm -f *_cseo.mexglx *_input.mexglx *_simpar.mexglx *_smxax.mexglx rm -f *_csex.mexglx *_numpar.mexglx *_smxa.mexglx *_state.mexglx rm -f *_ode.mexglx *_odeo.mexglx |
︙ | |||
1695 1696 1697 1698 1699 1700 1701 | 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 | - + | rm -f $1_*_write.r $1_simpar.m $1_simpar.p rm -f $1_cseo.oct $1_input.oct $1_simpar.oct $1_smxax.oct rm -f $1_csex.oct $1_numpar.oct $1_smxa.oct $1_state.oct rm -f $1_ode.oct $1_odeo.oct rm -f $1_cseo.mexglx $1_input.mexglx $1_simpar.mexglx $1_smxax.mexglx rm -f $1_csex.mexglx $1_numpar.mexglx $1_smxa.mexglx $1_state.mexglx rm -f $1_ode.mexglx $1_odeo.mexglx |
︙ |
Modified mttroot/mtt/lib/rep/sfun_rep/Makefile from [35509f7ef3] to [cc2f9e7025].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 | - + | #! /usr/bin/make -f all: $(SYS)_sfun.mexglx |
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | + + + + + + + + + + - + + + + | echo Creating $@ mex $(SYS)_sfun_input.c $(SYS)_sfun_input.c:: ${MTT_REP}/sfun_rep/sfun_input.c.tmpl echo Creating $@ cat $^ | sed 's/<mtt_model_name>/$(SYS)/g' > $@ $(SYS)_sfun_interface.mexglx: $(SYS)_sfun_interface.c sfun_debug.h $(SYS)_def.h $(SYS)_sympar.h $(SYS)_numpar.c echo Creating $@ mex $(SYS)_sfun_interface.c $(SYS)_sfun_interface.c: ${MTT_REP}/sfun_rep/sfun_interface.c.tmpl $(SYS)_struc.c echo Creating $@ cat ${MTT_REP}/sfun_rep/sfun_interface.c.tmpl |\ sed 's/<mtt_model_name>/$(SYS)/g' |\ ${MTT_REP}/sfun_rep/insert_file.sh > $@ |
︙ | |||
58 59 60 61 62 63 64 65 66 67 68 69 70 71 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | + + + + + + + + + | $(SYS)_odeo.c: $(SYS)_odeo.m echo Creating $@ ${MTT_CC}/mtt_m2cc.sh $(SYS) odeo c cat $(SYS)_state.c: $(SYS)_state.m echo Creating $@ ${MTT_CC}/mtt_m2cc.sh $(SYS) state c cat $(SYS)_struc.c: $(SYS)_struc.txt echo Creating $@ gawk '\ ($$1 == "input") { printf " double *%s\t= &(mttu[%d]);\t/* input and output */\n", $$4, $$2-1 }\ ($$1 == "state") { printf " const double *%s\t= &(mttx[%d]);\t/* input */\n", $$4, $$2-1 }\ ($$1 == "output") { printf " const double *%s\t= &(mtty[%d]);\t/* input */\n", $$4, $$2-1 }\ ($$1 != "input" && $$1 != "state" && $$1 != "output") { }\ ' $^ > $@ sfun_debug.h:: ${MTT_REP}/sfun_rep/sfun_debug.h echo Copying $@ cp $^ $@ %:: mtt -q $(OPTS) `echo $* | sed 's/\(.*\)_\(.*\)\.\(.*\)/\1 \2 \3/'` |
Modified mttroot/mtt/lib/rep/sfun_rep/README.tmpl from [ae40a63903] to [4bfb771bf0].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | + + + + | To build a Simulink funtion of the <mtt_model_name> model without using MTT: mex <mtt_model_name>_sfun.c The input block can be created with: mex <mtt_model_name>_sfun_input.c If numerical solution of algebraic equations is also required: mex <mtt_model_name>_sfun_ae.c The interface block can be created with mex <mtt_model_name>_sfun_interface.c |
Added mttroot/mtt/lib/rep/sfun_rep/insert_file.sh version [25cb36fec8].
|
Modified mttroot/mtt/lib/rep/sfun_rep/mdl.tmpl from [a18037fb99] to [16ba1b6745].
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + - + - + | Model { |
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - - + + | BrowserLookUnderMasks off Created "Mon May 20 13:21:21 2002" Creator "geraint" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%<Auto>" LastModifiedBy "geraint" ModifiedDateFormat "%<Auto>" |
︙ | |||
150 151 152 153 154 155 156 | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | - - + + - - + + + + + + + + + + + + - + + - - - - - + + + + + + - - - - - - + + + + + + + + + + + - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - - - - + + + | LineDefaults { FontName "Helvetica" FontSize 9 FontWeight "normal" FontAngle "normal" } System { |
Added mttroot/mtt/lib/rep/sfun_rep/sfun_interface.c.tmpl version [aa22fb9cbe].