Open qiuanran opened 9 months ago
Configed bsc env on Ubuntu 23.10
Just fellow the official tutorial and it can work!
Personally,strongly recommend:no necessary to watch these first four lessons with basic assembly knowledge(a bit of a waste of time)
Tomorrow,I gonna finish lab1
Finished the P6~P7 videos of MIT6.004
It's quite useful that I learned more circuits optimizations which never thought about it in class before.
In the Digital Logic class, I was taught more about simplifying expression which may appeara in the exam, but never really think about them from circuit hardware or wire area perspective.
And It seems not introduce how to optimized circuit for manual, complicated of cources. Instead, bulespec synthesis tool can work this out, maybe some day I will figure out how it works.
Finished Lab1
There is a problem: When I was work exercise5, I was first write like this:
function Bit#(n) multiplexer_n(Bit#(1) sel, Bit#(n) a, Bit#(n) b); Bit#(n) res; for (Integer i = 0; i < valueof(n); i = i + 1)begin res[i] = multiplexer1(sel,a[i],b[i]); end return res; endfunction
And then when I make testbench, the compiler error:res uses uninitialized value (the position shown is the object's declaration). If this error is unexpected, please consult KPNS #32.
That's kinda weird, because I didn't assign a value the first few times I exe'd it, and I checked other people's repo's afterward and they didn't assign the initial value either.
And after I do Bit#(n) res = 0;
It passed the testbench.
Maybe there's something wrong and I'm too new to the Bluespec.
Good question! Have you ever checkout the KNPS #32 as the compiler told you? And it's best practise to give init value to every variable.
The compiler maybe not smart enough to figure out that every element in res
has been assigned a value.
Also, you can clone and compile others' code and see if it will resport the same issue. If it does, you can open issues in there repos or submit this problem in our QQ group.
Good question! Have you ever checkout the KNPS #32 as the compiler told you? And it's best practise to give init value to every variable.
The compiler maybe not smart enough to figure out that every element in
res
has been assigned a value.Also, you can clone and compile others' code and see if it will resport the same issue. If it does, you can open issues in there repos or submit this problem in our QQ group.
Yeah, I checkout the KNPS #32 and I can just find a PDF which point this situation out, and it turns out the code I wrote at first is a typical syntax wrong and and right way is to give the initial value at the time of definition.
And the strange things is: I pulled some code that also doesn't declare an initial value, and it's also reporting an error as before to me locally.Maybe it due to the different version of BSC.
Finished P8 videos of MIT6.004
Basic Digital Logic knowledge, take it as a review.
Finished Lab2 of MIT6.175
In EXE3, I implement an unsigned adder and I test signed and unsigned both. It turns out only unsigned can match, I maybe wrong. >Discussion Question 3 (1 Point): Is your implementation of multiply_by_adding a signed multiplier or an unsigned multiplier? (Note: if it does not match either multiply_signed or multiply_unsigned, it is wrong).
Until after all the finals are over this Thursday, then it's labs
仓库地址:https://github.com/qiuanran/DatenTraning