File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -160,15 +160,21 @@ begin
160
160
end if ;
161
161
end process ;
162
162
163
- cs_n_g : for i in 0 to SLAVE_COUNT- 1 generate
164
- cs_n_p : process (addr_reg, chip_select_n)
165
- begin
166
- if (addr_reg = i) then
167
- CS_N(i) <= chip_select_n;
168
- else
169
- CS_N(i) <= '1' ;
170
- end if ;
171
- end process ;
163
+ one_slave_g : if (SLAVE_COUNT = 1 ) generate
164
+ CS_N(0 ) <= chip_select_n;
165
+ end generate ;
166
+
167
+ more_slaves_g : if (SLAVE_COUNT > 1 ) generate
168
+ cs_n_g : for i in 0 to SLAVE_COUNT- 1 generate
169
+ cs_n_p : process (addr_reg, chip_select_n)
170
+ begin
171
+ if (addr_reg = i) then
172
+ CS_N(i) <= chip_select_n;
173
+ else
174
+ CS_N(i) <= '1' ;
175
+ end if ;
176
+ end process ;
177
+ end generate ;
172
178
end generate ;
173
179
174
180
-- -------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments