Subversion Repositories HelenOS

Rev

Rev 3592 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3592 rimsky 1
# Assembled from the "niagara-simple" machine configuration files distributed
2
# with Simics. Boots from an ISO9660 images.
3
 
3664 rimsky 4
if not defined num_cpus {$num_cpus  = 32}
3592 rimsky 5
if not defined freq_mhz {$freq_mhz  = 5}
6
if not defined rtc_time {$rtc_time  = "2006-04-04 12:00:00 UTC"}
7
 
8
###
9
 
10
add-directory "%simics%/targets/niagara-simple/images/"
11
 
12
import-std-components
13
import-niagara-simple-components
14
 
15
if $num_cpus == 1 {
16
    $num_cores = 1
17
    $num_strands = 1
18
} else if $num_cpus == 2 {
19
    $num_cores = 2
20
    $num_strands = 1
21
} else if $num_cpus == 32 {
22
    $num_cores = 8
23
    $num_strands = 4
24
} else {
25
    echo "Unsupported number of processors. (Use 1, 2, or 32)"
26
}
27
 
28
$system = (create-niagara-simple-system cpu_frequency = $freq_mhz
29
                                        num_cores = $num_cores
30
                                        strands_per_core = $num_strands
31
                                        rtc_time = $rtc_time)
32
$console = (create-std-text-console)
33
$system.connect com1 $console
34
 
35
$machine_defined = 1
36
 
37
instantiate-components
38
 
39
####
40
 
41
$system.set-prom-defaults
3664 rimsky 42
$system.set-prom-env diag-switch? false
3592 rimsky 43
$system.set-prom-env auto-boot? true
44
 
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.
47
$image = ($system.get-component-object disk_image)
48
@image = sim.objects[simenv.image]
49
@image.files = [['image.iso', 'ro', 0, 1290240]]