$date
Thu Dec 17 17:19:03 2020
$end
$version
Aldec HDL Simulator Version 10.03.3558
$end
$timescale
1 ps
$end

$scope module tb $end

$scope module t $end
$var wire 1 ! CLK $end
$var wire 1 " LED $end
$var wire 1 # PIN_10 $end
$var wire 1 $ PIN_11 $end
$var wire 1 % PIN_12 $end
$var wire 1 & PIN_13 $end
$var wire 1 ' SPI_In $end
$var wire 1 ( SPI_Out $end
$var wire 1 ) SPI_Data_Available $end
$var wire 1 * RegMap_In $end
$var wire 1 + RegMap_Out $end
$var wire 1 , RegMap_Data_Available $end
$var wire 8 - AddrBus [7:0] $end
$var wire 8 . DataBus [7:0] $end

$scope module controller $end
$var wire 1 ! clk $end
$var wire 1 " LED $end
$var wire 8 . DataBus [7:0] $end
$var wire 1 ) SPI_Data_Available $end
$var wire 1 , RegMap_Data_available $end
$var wire 8 / addr [7:0] $end
$var wire 8 0 data [7:0] $end
$var wire 1 1 BusActive $end
$var reg 8 2 AddrBus [7:0] $end
$var reg 1 3 SPI_In $end
$var reg 1 4 SPI_Out $end
$var reg 1 5 RegMap_In $end
$var reg 1 6 RegMap_Out $end
$var reg 1 7 LED_state $end
$var reg 3 8 block [2:0] $end
$var reg 3 9 doing [2:0] $end
$var parameter 3 : IDLE $end
$var parameter 3 ; READ_ADDR $end
$var parameter 3 < READ_DATA $end
$var parameter 3 = TX $end
$var parameter 3 > SPI $end
$upscope $end


$scope module reg_mag_i $end
$var wire 1 ! clk $end
$var wire 1 + RegMap_Out $end
$var wire 1 * RegMap_In $end
$var wire 8 - AddrBus [7:0] $end
$var wire 8 . DataBus [7:0] $end
$var wire 1 ? r_w $end
$var wire 1 @ outputData $end
$var wire 1 A inputData $end
$var reg 1 B RegMap_Data_Available $end
$var reg 8 C inData [7:0] $end
$var reg 8 D inAddr [7:0] $end
$var reg 8 E outData [7:0] $end
$var reg 1 F addr_rcv $end
$var reg 1 G data_rcv $end
$var reg 2 H state [1:0] $end
$var parameter 2 I INIT $end
$var parameter 2 J IDLE $end
$var parameter 2 K RX $end
$var parameter 2 L TX $end
$var parameter 32 M MAXADDRESS $end
$upscope $end


$scope module SPI_i $end
$var wire 1 ! clk $end
$var wire 1 # SCK $end
$var wire 1 $ SSEL $end
$var wire 1 % MOSI $end
$var wire 1 & MISO $end
$var wire 1 ' SPI_In $end
$var wire 1 ( SPI_Out $end
$var wire 8 - AddrBus [7:0] $end
$var wire 8 . DataBus [7:0] $end
$var wire 1 N SCK_risingedge $end
$var wire 1 O SCK_fallingedge $end
$var wire 1 P SSEL_active $end
$var wire 1 Q MOSI_data $end
$var reg 1 R SPI_Data_Available $end