Rev 3592 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3592 | Rev 3664 | ||
---|---|---|---|
1 | # Assembled from the "niagara-simple" machine configuration files distributed |
1 | # Assembled from the "niagara-simple" machine configuration files distributed |
2 | # with Simics. Boots from an ISO9660 images. |
2 | # with Simics. Boots from an ISO9660 images. |
3 | 3 | ||
4 | if not defined num_cpus {$num_cpus = 1} |
4 | if not defined num_cpus {$num_cpus = 32} |
5 | if not defined freq_mhz {$freq_mhz = 5} |
5 | if not defined freq_mhz {$freq_mhz = 5} |
6 | if not defined rtc_time {$rtc_time = "2006-04-04 12:00:00 UTC"} |
6 | if not defined rtc_time {$rtc_time = "2006-04-04 12:00:00 UTC"} |
7 | 7 | ||
8 | ### |
8 | ### |
9 | 9 | ||
10 | add-directory "%simics%/targets/niagara-simple/images/" |
10 | add-directory "%simics%/targets/niagara-simple/images/" |
11 | 11 | ||
12 | import-std-components |
12 | import-std-components |
13 | import-niagara-simple-components |
13 | import-niagara-simple-components |
14 | 14 | ||
15 | if $num_cpus == 1 { |
15 | if $num_cpus == 1 { |
16 | $num_cores = 1 |
16 | $num_cores = 1 |
17 | $num_strands = 1 |
17 | $num_strands = 1 |
18 | } else if $num_cpus == 2 { |
18 | } else if $num_cpus == 2 { |
19 | $num_cores = 2 |
19 | $num_cores = 2 |
20 | $num_strands = 1 |
20 | $num_strands = 1 |
21 | } else if $num_cpus == 32 { |
21 | } else if $num_cpus == 32 { |
22 | $num_cores = 8 |
22 | $num_cores = 8 |
23 | $num_strands = 4 |
23 | $num_strands = 4 |
24 | } else { |
24 | } else { |
25 | echo "Unsupported number of processors. (Use 1, 2, or 32)" |
25 | echo "Unsupported number of processors. (Use 1, 2, or 32)" |
26 | } |
26 | } |
27 | 27 | ||
28 | $system = (create-niagara-simple-system cpu_frequency = $freq_mhz |
28 | $system = (create-niagara-simple-system cpu_frequency = $freq_mhz |
29 | num_cores = $num_cores |
29 | num_cores = $num_cores |
30 | strands_per_core = $num_strands |
30 | strands_per_core = $num_strands |
31 | rtc_time = $rtc_time) |
31 | rtc_time = $rtc_time) |
32 | $console = (create-std-text-console) |
32 | $console = (create-std-text-console) |
33 | $system.connect com1 $console |
33 | $system.connect com1 $console |
34 | 34 | ||
35 | $machine_defined = 1 |
35 | $machine_defined = 1 |
36 | 36 | ||
37 | instantiate-components |
37 | instantiate-components |
38 | 38 | ||
39 | #### |
39 | #### |
40 | 40 | ||
41 | $system.set-prom-defaults |
41 | $system.set-prom-defaults |
42 | $system.set-prom-env diag-switch? true |
42 | $system.set-prom-env diag-switch? false |
43 | $system.set-prom-env auto-boot? true |
43 | $system.set-prom-env auto-boot? true |
44 | 44 | ||
45 | # Simics "niagara-simple" machine does not support CD-ROM device, fortunatelly |
45 | # Simics "niagara-simple" machine does not support CD-ROM device, fortunatelly |
46 | # it is able to boot from a disk image in ISO9660 format. |
46 | # it is able to boot from a disk image in ISO9660 format. |
47 | $image = ($system.get-component-object disk_image) |
47 | $image = ($system.get-component-object disk_image) |
48 | @image = sim.objects[simenv.image] |
48 | @image = sim.objects[simenv.image] |
49 | @image.files = [['image.iso', 'ro', 0, 1290240]] |
49 | @image.files = [['image.iso', 'ro', 0, 1290240]] |
50 | 50 |