# SCA core reset in CRU python utilities

**URL:** <https://alice-talk.web.cern.ch/t/sca-core-reset-in-cru-python-utilities/144>\
**Category:** O² CRU\
**Created:** [October 15, 2018, 12:05pm UTC](https://alice-talk.web.cern.ch/t/sca-core-reset-in-cru-python-utilities/144 "2018-10-15T12:05:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skirsch2](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/s/cdc98d/32.png) [@skirsch2](https://alice-talk.web.cern.ch/u/skirsch2)\
**Post date:** [October 15, 2018, 12:05pm UTC](https://alice-talk.web.cern.ch/t/sca-core-reset-in-cru-python-utilities/144/1 "2018-10-15T12:05:57Z")

</div>

Hi,

could you explain the difference of the following two code sections?  
Which one is the correct way of resetting the SCA FPGA core?

[https://gitlab.cern.ch/alice-cru/cru-sw/blob/master/COMMON/SCA.py#L28](https://gitlab.cern.ch/alice-cru/cru-sw/blob/master/COMMON/SCA.py#L28)  
[https://gitlab.cern.ch/alice-cru/cru-sw/blob/master/COMMON/SCA.py#L194](https://gitlab.cern.ch/alice-cru/cru-sw/blob/master/COMMON/SCA.py#L194)

On a side note:  
We would prefer it if the **init** () routines would not already change the state of the hardware. It is quite confusing to simply run, e.g., GBTSC/sw/sca\_prg.py, without ‘doing’ anything, but behind the scenes something gets reset in the hardware and stuff magically works again.

Best regards

---

<div class="post-metadata">

**Author:** ![costaf](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/c/c0e974/32.png) [@costaf](https://alice-talk.web.cern.ch/u/costaf)\
**Post date:** [October 15, 2018, 2:19pm UTC](https://alice-talk.web.cern.ch/t/sca-core-reset-in-cru-python-utilities/144/2 "2018-10-15T14:19:33Z")

</div>

Ciao,  
indeed the function

```auto
def reset(self, debug = None) :
        """
        RESET the SCA block inside the FPGA
        """
        self.rocWr(self.wr_add_ctr, 0x800000, debug)
        self.rocWr(self.wr_add_ctr, 0x0, debug)

```

is old and not supported by the firmware anymore.

I used the reset in the init, because when I switch from one gbt CH to another one I want to reset the core.  
I will discuss with the other and see if we should remove it.

Thx
