Address decoding in AHB

please explain me about how address decoding is done to generate slave select

In reply to GADDAM VINOD BABU:

I tried to find it.many places they are saying “simple address decoding schemes”.but i didn’t get exact logic.need to explore more.i will come back to you once i get it.

In reply to GADDAM VINOD BABU:

Here is an example which allocate each slave with 'h100_0000 address space. thus use address’s highest 8 bits to decode slave select.


parameter SLV0_ADDR_BASE = 'h00; //slave 0 address space :'h0000_0000 ~ 'h00ff_ffff; 
parameter SLV1_ADDR_BASE = 'h01; //slave 1 address space :'h0100_0000 ~ 'h01ff_ffff; 
parameter SLV2_ADDR_BASE = 'h02; //slave 2 address space :'h0200_0000 ~ 'h02ff_ffff;
parameter SLV3_ADDR_BASE = 'h03; //slave 3 address space :'h0300_0000 ~ 'h03ff_ffff;
parameter SLV4_ADDR_BASE = 'h04; //slave 4 address space :'h0400_0000 ~ 'h04ff_ffff;

module addr_decode(input [31:0] addr, output sel_slv0,sel_slv1, sel_slv2, sel_slv3, sel_slv4);
  assign sel_slv0 = (addr[31:24] == SLV0_ADDR_BASE) ? 1: 0;
  assign sel_slv1 = (addr[31:24] == SLV1_ADDR_BASE) ? 1: 0;
  assign sel_slv2 = (addr[31:24] == SLV2_ADDR_BASE) ? 1: 0;
  assign sel_slv3 = (addr[31:24] == SLV3_ADDR_BASE) ? 1: 0;
  assign sel_slv4 = (addr[31:24] == SLV4_ADDR_BASE) ? 1: 0;
endmodule

In reply to Lina.Lin:

Thank you.

is this decoding technique following in AHB or it is just an example?

In reply to Hanumanth92:

This is just an example, you can implement the similar thing with always and case block etc.

AHB standard protocol only says The select signal is a combinatorial decode of the high-order address signals. What high-order address signals to be used is determined by your product system architecture definition.

Regards,
Lina