when we replace the above highlighted line as “output a;”, there is no problem. I want use only a[0] in the clocking block, is this possible by any other way…?
You can only put whole variable names in clocking block declarations. There is no reason you couldn’t put ‘a’ in the clocking block and select a[0] when referencing it.
Thank you for your reply sir. The above example code is just an example code. I have designed a dual port RAM with variable latencies. PORT-A has to work with one clock and PORT-B has to work with the same or another clock. In this case, I need to synchronize the PORT-A signals like enables, inputs and outputs to clk_1 and PORT-B signals to clk_2. The signals were named as i_data[0] for PORT-A data input and i_data[1] for PORT-B data input. So I need to put i_data[0] in one clocking block and i_data[1] in another clocking block. This is the original example. Is there any other way to overcome this problem without changing array way of declaration of signals to explicitly declaring as i_data_a and i_data_b…?
Was trying a similar approach. However, it was giving me error for the 2 dimensional array. Thus, had to make changes on it accordingly.
Error Type: Error-[SE] Syntax error
Following verilog source has syntax error :
214: token is ‘[’
input [P_NUM_CH-1:0][P_RSP_W-1:0] A
This was actually a 2D array which was being used via the intf.cb.A . Didn’t understood the reason for error on this when the consistency is maintained for the signal.