source: trunk/softs/test_llsc/scripts/tsarch.py @ 547

Last change on this file since 547 was 546, checked in by meunier, 11 years ago

Rajout du composant Sim Helper dans le répertoire soft/test_llsc pour l'outil de test automatisé du LL/SC

  • Property svn:executable set to *
File size: 1.7 KB
RevLine 
[536]1#!/usr/bin/env python
2
3from dsx.hard.hard import *
4
5
6def TSArch(cluster_x, cluster_y, nb_proc = 1, nb_tty = 8, wcoproc = False):
7 
8    nb_cluster = cluster_x * cluster_y
9
10    hd = Hardware(cluster_x, cluster_y , addr_size = 40, nb_proc = nb_proc, ccoherence = True) #nb_proc : proc by cluster
11
12
13    ######### peripherals ##########
14    hd.add(Tty('PSEG_TTY', pbase = 0xB4000000, channel_size = 16, nb_channel = nb_tty))
15    hd.add(Fbf('PSEG_FBF', pbase = 0xB2000000, channel_size = 352 * 288 * 2, nb_channel = 1))
16    hd.add(Ioc('PSEG_IOC', pbase = 0xB3000000, channel_size = 32, nb_channel = 1))
[546]17    hd.add(SimH('PSEG_SIMH', pbase = 0xB7000000, channel_size = 32, nb_channel = 1)) # 6 mapped registers
[536]18
19    hd.add(Xicu('PSEG_XICU', pbase = 0xB0000000, channel_size = 32, nb_channel = nb_proc, replicated = True)) # name suffixed with "_<num_cluster>"
20    hd.add(Dma('PSEG_DMA', pbase = 0xB1000000, channel_size = 32, nb_channel = nb_proc, replicated = True))
21   
22    ############## MEMORY ###########
23    for cl in range(nb_cluster):
24        hd.add(RAM('PSEG_RAM_%d'%cl, pbase = 0x00000000 + (cl * hd.cluster_span), size = 0x00C00000))
25
26    ############## IRQ ############
27    hd.add(Irq(cluster_id = 0, proc_id = 0, icu_irq_id = 31, peri = Ioc, channel_id = 0))
28    for j in range(16, 31):
29        hd.add(Irq(cluster_id = 0, proc_id = 0, icu_irq_id = j, peri = Tty, channel_id = j - 16))
30
31    for cl in range(nb_cluster):
32        for p in xrange(nb_proc):
33            hd.add(Irq(cluster_id = cl, proc_id = p, icu_irq_id = p + 8, peri = Dma,  channel_id = p))
34            hd.add(Irq(cluster_id = cl, proc_id = p, icu_irq_id = p,     peri = Xicu, channel_id = p)) 
35
36
37    ############# ROM ############
38    hd.add(ROM("PSEG_ROM", pbase = 0xbfc00000, size = 0x00100000)) 
39
40    return hd
41
Note: See TracBrowser for help on using the repository browser.