@@ -36,16 +36,16 @@ def __init__(self, entity):
3636
3737 async def init (self ):
3838 # Defaults
39- self .bus .BUS_RST < = 1
40- self .bus .BUS_RD < = 0
41- self .bus .BUS_WR < = 0
42- self .bus .BUS_ADD < = self ._x
43- self .bus .BUS_DATA < = self ._high_impedence
39+ self .bus .BUS_RST . value = 1
40+ self .bus .BUS_RD . value = 0
41+ self .bus .BUS_WR . value = 0
42+ self .bus .BUS_ADD . value = self ._x
43+ self .bus .BUS_DATA . value = self ._high_impedence
4444
4545 for _ in range (8 ):
4646 await RisingEdge (self .clock )
4747
48- self .bus .BUS_RST < = 0
48+ self .bus .BUS_RST . value = 0
4949
5050 for _ in range (2 ):
5151 await RisingEdge (self .clock )
@@ -61,20 +61,20 @@ async def init(self):
6161 async def read (self , address , size ):
6262 result = []
6363
64- self .bus .BUS_DATA < = self ._high_impedence
65- self .bus .BUS_ADD < = self ._x
66- self .bus .BUS_RD < = 0
64+ self .bus .BUS_DATA . value = self ._high_impedence
65+ self .bus .BUS_ADD . value = self ._x
66+ self .bus .BUS_RD . value = 0
6767
6868 await RisingEdge (self .clock )
6969
7070 byte = 0
7171 while byte <= size :
7272 if byte == size :
73- self .bus .BUS_RD < = 0
73+ self .bus .BUS_RD . value = 0
7474 else :
75- self .bus .BUS_RD < = 1
75+ self .bus .BUS_RD . value = 1
7676
77- self .bus .BUS_ADD < = address + byte
77+ self .bus .BUS_ADD . value = address + byte
7878
7979 await RisingEdge (self .clock )
8080
@@ -96,36 +96,36 @@ async def read(self, address, size):
9696 else :
9797 byte += 1
9898
99- self .bus .BUS_ADD < = self ._x
100- self .bus .BUS_DATA < = self ._high_impedence
99+ self .bus .BUS_ADD . value = self ._x
100+ self .bus .BUS_DATA . value = self ._high_impedence
101101 await RisingEdge (self .clock )
102102
103103 return result
104104
105105 async def write (self , address , data ):
106106
107- self .bus .BUS_ADD < = self ._x
108- self .bus .BUS_DATA < = self ._high_impedence
109- self .bus .BUS_WR < = 0
107+ self .bus .BUS_ADD . value = self ._x
108+ self .bus .BUS_DATA . value = self ._high_impedence
109+ self .bus .BUS_WR . value = 0
110110
111111 await RisingEdge (self .clock )
112112
113113 for index , byte in enumerate (data ):
114- self .bus .BUS_DATA < = byte
115- self .bus .BUS_WR < = 1
116- self .bus .BUS_ADD < = address + index
114+ self .bus .BUS_DATA . value = byte
115+ self .bus .BUS_WR . value = 1
116+ self .bus .BUS_ADD . value = address + index
117117 await Timer (1 ) # This is hack for iverilog
118- self .bus .BUS_DATA < = byte
119- self .bus .BUS_WR < = 1
120- self .bus .BUS_ADD < = address + index
118+ self .bus .BUS_DATA . value = byte
119+ self .bus .BUS_WR . value = 1
120+ self .bus .BUS_ADD . value = address + index
121121
122122 await RisingEdge (self .clock )
123123
124124 if self ._has_byte_acces and self .bus .BUS_BYTE_ACCESS .value .integer == 0 :
125125 raise NotImplementedError ("BUS_BYTE_ACCESS for write to be implemented." )
126126
127- self .bus .BUS_DATA < = self ._high_impedence
128- self .bus .BUS_ADD < = self ._x
129- self .bus .BUS_WR < = 0
127+ self .bus .BUS_DATA . value = self ._high_impedence
128+ self .bus .BUS_ADD . value = self ._x
129+ self .bus .BUS_WR . value = 0
130130
131131 await RisingEdge (self .clock )
0 commit comments