and I want to use only one bit of the wishbone to write to my design
which is a register. I tried the following but it is not working:
Copy code
reg [127:0] temp;
always@(posedge clk) begin
if(rst) begin
ready <=0;
temp <=0;
end else if (valid && !ready) begin
temp <= temp << 1;
temp[0] <= wbs_dat_i[0];
ready <=1;
end
end
assign out = temp[127];
then in the c file
Copy code
#define reg_wb_serial (*(volatile uint32_t*)0x30000000)
int val =0;
int main(){
reg_wb_enable = 1;
// other configs
for (int i =0; i<128; i++)
{
val = ~val;
reg_wb_serial = (0x00000000 | val);
}
}
Could you tell me where I'm doing wrong? Thanks in advance for any help.
Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.