Alex_Ivan
Newbie level 3
Hello!
My name is Alex and I'm currently working on a datapath design. The instructions are: Design a system that sum the values stored in a memory from a specific address. The sum system includes the design of and finite state machine (FSM) and a datapath. A test bench is provided to validate your system.
I have already search and done a design but I'm not sure if I'm in the correct way.
My design is the following:
I understand the coding, so I don't have problem with it.
Thanks!!
This pseucode is the reference of the project
My question is: the code above represent the counter itself? and what is doing with mem[startaddr+i];?
My name is Alex and I'm currently working on a datapath design. The instructions are: Design a system that sum the values stored in a memory from a specific address. The sum system includes the design of and finite state machine (FSM) and a datapath. A test bench is provided to validate your system.
I have already search and done a design but I'm not sure if I'm in the correct way.
My design is the following:
I understand the coding, so I don't have problem with it.
Thanks!!
This pseucode is the reference of the project
Code:
int sumcalc(int startaddr, int numxfer) {
int sum = 0;
For(i=0; i<numxfer; i++) {
sum = sum + mem[startaddr+i];
}
return sum;
}
My question is: the code above represent the counter itself? and what is doing with mem[startaddr+i];?