Advertisement
Guest User

Untitled

a guest
Mar 21st, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.53 KB | None | 0 0
  1. val circuitti = readEnable.host
  2.    
  3.     val wordcount=pow(2,address.length).toInt
  4.    
  5.     val states = new Array[Bus](wordcount)
  6.    
  7.     for(i<-0 until wordcount){
  8.       states(i) = circuitti.inputs(data.length)
  9.     }
  10.    
  11.     val addr=buildDecoder(address)
  12.    
  13.     for(i<- 0 until states.length){
  14.       states(i).buildFeedback(buildTwoBusSelector(states(i), data, writeEnable&&addr(i)))
  15.     }
  16.    
  17.     val output = circuitti.inputs(data.length)
  18.    
  19.     buildTwoBusSelector(output,buildBusSelector(states, addr),readEnable)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement