- THUCST Thinpad rev.3 (early 2018)
- Vivado 2018
- mips-mti-elfi toolchain
- Python 2.7
- Tensorflow 1.3.0
To build and run the monitor:
- Use Vivado to compile the project, yielding a .bit file
- Run
make ON_FPGA=y
atthinpad_top.test
directory, yielding the kernel program in binary formatkernel.bin
- Write
kernel.bin
into the Flash - Write the .bit file into the FPGA
- Connect the terminal to the thinpad
- Click the reset button
The screen should display "MONITOR for MIPS32 - initialized" after these steps.
For more information, please refer to https://github.com/z4yx/supervisor-mips32.
We've developed a sequence-to-sequence chatbot for our MIPS32 CPU.
We implemented the model in Python 2.7 and Tensorflow first, and we then implemented a MIPS32 Assembly version of the inference code for the CPU we developed. The code of the chatbot is located at /app
.
Based on the previously prepared FPGA, you may follow the steps below to get the chatbot work:
-
Prepare the datasets at the
app/data
directory. We use:And we also use the 50-dimensional GloVe word vectors.
-
Train the sequence-to-sequence model:
cd app/tf
python data_pre.py
python main.py --is_train
- Dump the model parameters:
cd app/tf
python main.py --run_dump
cp params.S ../as
- Build the chatbot for our MIPS32 CPU:
cd app/as
make
- Write
params.bin
into the BaseRAM - Write
kernel.bin
into the Flash - Click the reset button
- Now you can chat with the chatbot!