You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
834 B
Python
38 lines
834 B
Python
from ..simu import *
|
|
import numpy as np
|
|
import cmsisdsp as dsp
|
|
from .VHT import *
|
|
|
|
|
|
class VHTSource(GenericSource):
|
|
def __init__(self,outputSize,fifoout,theid):
|
|
GenericSource.__init__(self,outputSize,fifoout)
|
|
self._src_=Source(theid,outputSize)
|
|
self._src_.wait()
|
|
|
|
def run(self):
|
|
o=self.getWriteBuffer()
|
|
|
|
theInput = self._src_.get()
|
|
o[:]=theInput[:]
|
|
|
|
|
|
return(0)
|
|
|
|
def __del__(self):
|
|
self._src_.end()
|
|
|
|
class VHTSink(GenericSink):
|
|
def __init__(self,inputSize,fifoin,theid):
|
|
GenericSink.__init__(self,inputSize,fifoin)
|
|
self._sink_=Sink(theid,inputSize)
|
|
self._sink_.wait()
|
|
|
|
def run(self):
|
|
i=self.getReadBuffer()
|
|
self._sink_.put(i)
|
|
|
|
return(0)
|
|
|
|
def __del__(self):
|
|
self._sink_.end() |